2010/8/25 <aaron.mead...@thomsonreuters.com>: > Hi all. > > > > 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()
I wouldn't use link_directories but target_link_libraries(<target> debug $ENV{RDFD3RDPARTYDIR}/lib/Debug/whateverlib optimized $ENV{RDFD3RDPARTYDIR}/lib/Release/whateverlib ) > 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 think target_link_libraries with full path to lib is preferred to link_directories + target_link_libraries with no path. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org _______________________________________________ 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