I am looking for a way to tell my project to link against external debug libraries with a debug build and external release libraries with a release build with Visual Studio.

I sort of want to be able to say something like
if (BuildingReleaseConfig)
find_package(OtherPackage REQUIRED COMPONENTS one two three PATHS OtherPkgDir/Release)
endif()

if (BuildingDebugConfig)
find_package(OtherPackage REQUIRED COMPONENTS oned twod threed PATHS OtherPkgDir/Debug)
endif()

the idea is that the if () tells CMake which build configuration the find_package results should go into. Is there any way to tell CMake what to write into each VS configuration?

I realize the traditional CMake way is to create only one build at a time and specify CMAKE_BUILD_TYPE, but we seem to have stepped beyond that with the Visual Studio generator.

Lee
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to