I am defining separate output paths for different configurations:
CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG = bin/win32/dbg
CMAKE_RUN TIME_OUTPUT_DIRECTORY_RELEASE = bin/win32/opt
CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG = lib/win32/dbg
CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE = lib/win32/opt
CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG = bin/win32/dbg
CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE = bin/win32/opt
And in Visual Studio the CMake command add_library() command does a fine job of
choosing between CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG for the Debug
configuration, and CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE for the Release
configuration.
I can see how I might use CMAKE_CFG_INTDIR to get the IDE configuration, but
its value is "Debug" or "Release". If I were to use
"lib/win32/${CMAKE_CFG_INTDIR}", I would get "lib/win32/Debug" or
"lib/win32/Release", which is incorrect.
I can imagine some sort of non-portable solution, but I am wondering if there
is a standard approach, or an example from which I might draw inspiration.
My application is compiling C# within add_custom_command().
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake