diff options
author | Mike McQuaid <mike@mikemcquaid.com> | 2011-01-06 11:05:58 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-01-06 17:21:35 (GMT) |
commit | 492cd84fc5171fb030b19c12f5f72eea0f0ccda2 (patch) | |
tree | 031ff85168ae7c404eb4e9a72f867bf23c42a85d | |
parent | dd5c592ce863b50459e7c2ae27d72857b81eeedc (diff) | |
download | CMake-492cd84fc5171fb030b19c12f5f72eea0f0ccda2.zip CMake-492cd84fc5171fb030b19c12f5f72eea0f0ccda2.tar.gz CMake-492cd84fc5171fb030b19c12f5f72eea0f0ccda2.tar.bz2 |
Add variable for InstallRequiredSystemLibraries dir (#11140)
InstallRequiredSystemLibraries currently defaults to installing to
bin on WIN32 and lib otherwise. This patch allows you to configure
this by using the variable CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION.
It also switches the logic to use a single INSTALL(PROGRAMS) command
rather than two deprecated uses of the INSTALL_PROGRAMS command.
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index e60c987..575f912 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -1,5 +1,5 @@ # By including this file, all files in the CMAKE_INSTALL_DEBUG_LIBRARIES, -# will be installed with INSTALL_PROGRAMS into /bin for WIN32 and /lib +# will be installed with INSTALL(PROGRAMS ...) into bin for WIN32 and lib # for non-win32. If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP is set to TRUE # before including this file, then the INSTALL command is not called. # The user can use the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a @@ -11,6 +11,8 @@ # compiler, then the debug libraries are installed when available. # If CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time # libraries are installed as well as the CRT run time libraries. +# If CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION is set then the libraries are +# instaled to that directory rather than the default. #============================================================================= # Copyright 2006-2009 Kitware, Inc. @@ -292,10 +294,13 @@ ENDIF(MSVC) # specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS. IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP) - IF(WIN32) - INSTALL_PROGRAMS(/bin ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}) - ELSE(WIN32) - INSTALL_PROGRAMS(/lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}) - ENDIF(WIN32) + IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION) + IF(WIN32) + SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin) + ELSE(WIN32) + SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib) + ENDIF(WIN32) + ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION) + INSTALL(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}) ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP) ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) |