Ok, I'll give that a shot. I wonder if I could iterate the list of targets and make the target_link_libraries() calls on them in a loop.
Aaron C. Meadows -----Original Message----- From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Wednesday, August 25, 2010 9:59 AM To: Meadows, Aaron C. Cc: cmake@cmake.org Subject: Re: [CMake] Visual Studio Generator: different Link paths for Debug and Release 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 This email was sent to you by Thomson Reuters, the global news and information company. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters. _______________________________________________ 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