Zitat von aaron.mead...@thomsonreuters.com:
I need to use different link paths for Debug and Release builds of my
software. I'm building with the Visual Studio Generator (2005, 2008,
etc). I had put this in my CMakeLists.txt, but as it turns out, this
doesn't do what I need (likely because of the single pass to generate
the project files):
if(DEBUG)
link_directories("$ENV{RDFD3RDPARTYDIR}/lib/Debug")
else()
link_directories("$ENV{RDFD3RDPARTYDIR}/lib/Release")
endif()
So, my question: is there a way to have different link directory paths
for each configuration in visual studio without generating multiple
build directories for VS?
I could tell you to use lib/${CMAKE_CFG_INTDIR} instead of lib/Debug
and lib/Release. However, the names may not match what VS uses. The
solution is to use full path to libraries with "debug ..... optimized
...." syntax and completely forget about the existence of
link_directories().
HS
_______________________________________________
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