[CMake] exe/a/so sufixes depend on configuration
Dmytro Ovdiienko
dmitriy.ovdienko at gmail.com
Wed Mar 4 10:06:58 EST 2009
Hello All,
I use CMake to build my project's sources on windows and linux using static
and dynamic runtimes.
I would like to add information about build configuration to the output file
name as suffix.
For instance:
- libsome_lib_*linux_x32*.a - static library "some_lib" for linux 32bit
- some_lib_*windows_x64_md*.lib - static library "some_lib" for windows
64bit with dynamic release runtime
- some_lib_*windows_x62_mtd*.lib - static library "some_lib" for windows
32bit with static debug runtime
For windows I generate projects with debug and release configurations.
Right now I play with
- CMAKE_STATIC_LIBRARY_SUFFIX
- CMAKE_SHARED_MODULE_SUFFIX
- CMAKE_SHARED_LIBRARY_SUFFIX
- CMAKE_EXECUTABLE_SUFFIX
- CMAKE_<CONFIG>_POSTFIX
But it is not enought. CMAKE_<CONFIG>_POSTFIX changes suffix only for dll
and lib files. But not for exe file.
Also I played with <CONFIG>_OUTPUT_NAME. It solves my problem but I have to
change this property for all my projects. It is not obvious in my case. I
have too much projects.
Question: How can I setup suffixes for every configuration in one place?
Regards,
Dima
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090304/01a553f6/attachment.htm>
More information about the CMake
mailing list