mirror of
https://github.com/reactos/CMake.git
synced 2024-12-13 22:58:41 +00:00
Merge topic 'cmake-install-infix'
0315ab7a
Add installation infix (empty by default)
This commit is contained in:
commit
ec09e91a65
@ -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}}")
|
||||
|
Loading…
Reference in New Issue
Block a user