I would like to implement a naming scheme for libraries similar to the one mentioned here: Library name for x32 vs x64
The CMakeLists.txt file is setup to create a static library
add_library(test test.h test.cpp)
After creating a visual studio solution from the cmake lists the project is set up in such a way that the debug library test.lib is written to /x64/Debug/test.lib
and the release version is written to /x64/Release/test.lib
. I would prefer to write them both to /lib/
but append a "d" to the debug version. The idea is to get
/lib/test.lib
/lib/testd.lib
and if possible have an additional suffix for 64 bit builds to get
/lib/test.lib
/lib/test64.lib
/lib/testd.lib
/lib/test64d.lib
Is there a straightforward way to do this?
Edit: this can be used later nicely in the project using the libs like this: Linking different libraries for Debug and Release builds in Cmake on windows?
Edit: I had problems removing the Debug and Release folders from the output, which can be fixed by this answer: How to not add Release or Debug to output path?