On platforms other than Windows, the build type is a single value stored in CMAKE_BUILD_TYPE, and can be accessed if you want your build to different things in Debug, Release, etc modes.
On Windows with Visual Studio, there's a variable CMAKE_CONFIGURATION_TYPE that is a list of the builds that will be done. How do I recover the actual, current build type? The reason I need to do this: I need to import libraries built in an ExternalProject. On OS X or Linux, the libraries generated by the ExternalProject are in one predictable place. So I can do this: set(EP_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/${EP_NAME}-build/lib) On windows this will need to be # fictional variable WINDOWS_CURRENT_BUILD_TYPE giving current build type set(EP_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/${EP_NAME}-build/${WINDOWS_CURRENT_BUILD_TYPE}) Unfortunately, there's no such variable. And, given how Visual Studio works, where you can have a build that actually builds any number of build_types at one go, I'm not sure how to handle this. One thought I had was to always build the External Project as Release on Windows; then the libraries are someplace predictable. -- 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