I have a CMake-project where I want to include a 3rd party library with the following directory structure:
include/xx.h
x86-debug/xx.lib
x86-release/xx.lib
x64-debug/xx.lib
x64-release/xx.lib
I want to be able to build my project for all four of these configurations. How do I instruct CMake to link with the correct lib file depending on which architecture and build config (debug/release) I pass to cmake?
I have tried constructing the string “x86-debug” from variables accessible within the CMake script, but I have been unable to find variables that contain the build config and the architecture.
brydling is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2