Hi
I am attempting to "make install" into configuration dependent directories.
Linux works very straightforwardly but VS not so much.
After much searching my CMakeLists file includes:
INSTALL(TARGETS bob
RUNTIME DESTINATION ${INSTALL_LIB_PATH}/Debug
LIBRARY DESTINATION ${INSTALL_LIB_PATH}/Debug
ARCHIVE DESTINATION ${INSTALL_LIB_PATH}/Debug
CONFIGURATIONS Debug)
INSTALL(TARGETS bob
RUNTIME DESTINATION ${INSTALL_LIB_PATH}/Release
LIBRARY DESTINATION ${INSTALL_LIB_PATH}/Release
ARCHIVE DESTINATION ${INSTALL_LIB_PATH}/Release
CONFIGURATIONS Release)
Which is doing a little more than expected e.g.
3>PostBuildEvent:
3> -- Install configuration: "Debug"
3> -- Installing: <snip>/pc/x64_vs100/bob/lib/Debug/bob.lib
3> -- Installing: <snip>/pc/x64_vs100/bob/lib/Debug/bob.dll
3> -- Up-to-date: <snip>/pc/x64_vs100/bob/lib/Release/bob.dll
This final line was not expected. Looking at the cmake_install.cmake I can see
the appropriate section:
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL
"Unspecified")
IF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")
list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
"<snip>Libraries/pc/x64_vs100/bob/lib/Release/bob.dll")
IF (CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
message(WARNING "ABSOLUTE path INSTALL DESTINATION :
${CMAKE_ABSOLUTE_DESTINATION_FILES}")
ENDIF (CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
IF (CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by
caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
ENDIF (CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
FILE(INSTALL DESTINATION "<snip>Libraries/pc/x64_vs100/bob/lib/Release" TYPE
SHARED_LIBRARY FILES "<snip>Libraries/src/bob/Debug/bob.dll")
Where the configuration "Debug" has an install into the "Release" area?
I am using version 2.8.8 but have also found the same with 2.8.12.
I can write a custom post-build command but would like to understand,
thanks
Dominic
--
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://www.cmake.org/mailman/listinfo/cmake