You do not have a goal that is not taken into account in the configuration, but you may have an empty (or almost empty) library due to conditional compilation of the source code. And you can link to another library in a specific way using the "optimized" and "debug" keywords for target_link_libraries.
For example, in the library source files, you can:
#ifdef _DEBUG
You can then indicate that you are only referencing libVendor in the Release assembly using the "optimized" keyword for target_link_libraries, for example:
if(WIN32) add_library(mymodule ...) target_link_libraries(mymodule optimized libVendor) install(TARGETS mymodule LIBRARY) endif()
The documentation for target_link_libraries explains the use of these keywords, and also mentions that you can define IMPORTED goals to achieve effects for each configuration. However, to define IMPORTED targets, library files must already be created, and you will need to point to them. So ... conditional compilation is probably the easiest way to do what you want to do.
source share