2012/1/10 Totte Karlsson <[email protected]>: >>> >>> But when executing the PACKAGE target, from within VS IDE, the >>> ${CMAKE_BUILD_TYPE} does not seem to be set. >> >> >> VS IDE or XCode do not set this because they are able to handle >> several config at once. > yes. > >> You may try to use "CMAKE_CFG_INTDIR" instead. >> See: >> cmake --help-variable CMAKE_CFG_INTDIR > > > When executing the PACKAGE target from the IDE, that variable is evaluated > to > $(Configuration) > > Still don't get how to get the actual 'configuration' string, i.e. > Debug/Release etc, when executing the PACKAGE target in visual studio.
Ah...yes that's true. The "problem" is that this variable [$(Configuration)] is evaluated "at build time" so that you cannot get a value at CMake-time (when CMake is running). see: "Since these values are evaluated by the native build system, this variable is suitable only for use in command lines that will be evaluated at build time." Moreover I don't really know how to get that value when CPack is running.... (be it from PACKAGE or from command line). I guess one have to pass the value from the command line (or internal tool call) generated for the "PACKAGE" target. You may probably hand-craft you own custom_command/target for that but don't know how to add this to the built-in "PACKAGE" target. -- 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
