summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-01-12 15:20:38 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2017-01-12 15:20:38 (GMT)
commitec09e91a653fb5d2df2d4fe5c3bc76a453ac5e39 (patch)
treec94a4f175ff372479b592737b2e3e59f5092f753 /Source
parent592c8cfd93b8fd2ceb579b09b9b6f4c157adea3b (diff)
parent0315ab7a31091eda95caac319d42409c24fc6fac (diff)
downloadCMake-ec09e91a653fb5d2df2d4fe5c3bc76a453ac5e39.zip
CMake-ec09e91a653fb5d2df2d4fe5c3bc76a453ac5e39.tar.gz
CMake-ec09e91a653fb5d2df2d4fe5c3bc76a453ac5e39.tar.bz2
Merge topic 'cmake-install-infix'
0315ab7a Add installation infix (empty by default)
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeInstallDestinations.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/CMakeInstallDestinations.cmake b/Source/CMakeInstallDestinations.cmake
index 023f6c0..28f4e87 100644
--- a/Source/CMakeInstallDestinations.cmake
+++ b/Source/CMakeInstallDestinations.cmake
@@ -25,6 +25,12 @@ set(CMAKE_DOC_DIR_DESC "docs")
set(CMAKE_MAN_DIR_DESC "man pages")
set(CMAKE_XDGDATA_DIR_DESC "XDG specific files")
+set(CMake_INSTALL_INFIX "" CACHE STRING "")
+set_property(CACHE CMake_INSTALL_INFIX PROPERTY HELPSTRING
+ "Intermediate installation path (empty by default)"
+ )
+mark_as_advanced(CMake_INSTALL_INFIX)
+
foreach(v
CMAKE_BIN_DIR
CMAKE_DATA_DIR
@@ -41,7 +47,7 @@ foreach(v
# Use the default when the user did not set this variable.
if(NOT ${v})
- set(${v} "${${v}_DEFAULT}")
+ set(${v} "${CMake_INSTALL_INFIX}${${v}_DEFAULT}")
endif()
# Remove leading slash to treat as relative to install prefix.
string(REGEX REPLACE "^/" "" ${v} "${${v}}")