[CMake] CMake Visual Studio Configuration Single
Bill Hoffman
bill.hoffman at kitware.com
Tue Jul 1 10:53:31 EDT 2014
On 7/1/2014 3:38 AM, Jörg Kreuzberger wrote:
> As newbee to cmake i only could not understand why this single /
> multi configuration stuff is supported. it makes it more complicated,
> but i assume it is like always: historical grown.
It is supported because that is the way native development happens in
visual studio. If we did not have multi configuration support, the
visual studio developers would not be happy. It is also supported on
Apple Xcode.
BTW, you do not need to do this:
if( WIN32 )
if( MINGW)
set_property( ... ${CMAKE_CURRENT_BINARY_DIR}/x.dll)
else()
set_property( ...
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/x.dll)
else if( UNIX )
this will work on both platforms:
set_property( ...
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/x.dll)
CMAKE_CFG_INTDIR = "." on platforms without multi-config. So, it
would expand to ${CMAKE_CURRENT_BINARY_DIR}/./${CMAKE_CFG_INTDIR}/x.dll
Which would be fine.
-Bill
More information about the CMake
mailing list