2013-09-26 22:13:38 +04:00
|
|
|
# Keep formatting here consistent with bootstrap script expectations.
|
|
|
|
if(BEOS)
|
2016-05-27 17:03:43 +03:00
|
|
|
set(CMAKE_BIN_DIR_DEFAULT "bin") # HAIKU
|
2014-02-19 18:15:42 +04:00
|
|
|
set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # HAIKU
|
2013-09-26 22:13:38 +04:00
|
|
|
set(CMAKE_MAN_DIR_DEFAULT "documentation/man") # HAIKU
|
2014-02-19 18:15:42 +04:00
|
|
|
set(CMAKE_DOC_DIR_DEFAULT "documentation/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # HAIKU
|
2015-12-21 18:02:11 +03:00
|
|
|
set(CMAKE_XDGDATA_DIR_DEFAULT "share") # HAIKU
|
2013-09-26 22:13:38 +04:00
|
|
|
elseif(CYGWIN)
|
2016-05-27 17:03:43 +03:00
|
|
|
set(CMAKE_BIN_DIR_DEFAULT "bin") # CYGWIN
|
2013-10-25 16:55:50 +04:00
|
|
|
set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION}") # CYGWIN
|
2013-09-26 22:13:38 +04:00
|
|
|
set(CMAKE_DOC_DIR_DEFAULT "share/doc/cmake-${CMake_VERSION}") # CYGWIN
|
|
|
|
set(CMAKE_MAN_DIR_DEFAULT "share/man") # CYGWIN
|
2015-12-21 18:02:11 +03:00
|
|
|
set(CMAKE_XDGDATA_DIR_DEFAULT "share") # CYGWIN
|
2013-09-26 22:13:38 +04:00
|
|
|
else()
|
2016-05-27 17:03:43 +03:00
|
|
|
set(CMAKE_BIN_DIR_DEFAULT "bin") # OTHER
|
2014-02-19 18:15:42 +04:00
|
|
|
set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # OTHER
|
|
|
|
set(CMAKE_DOC_DIR_DEFAULT "doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # OTHER
|
2013-09-26 22:13:38 +04:00
|
|
|
set(CMAKE_MAN_DIR_DEFAULT "man") # OTHER
|
2015-12-21 18:02:11 +03:00
|
|
|
set(CMAKE_XDGDATA_DIR_DEFAULT "share") # OTHER
|
2013-09-26 22:13:38 +04:00
|
|
|
endif()
|
|
|
|
|
2016-05-27 17:03:43 +03:00
|
|
|
set(CMAKE_BIN_DIR_DESC "bin")
|
2013-09-26 22:13:38 +04:00
|
|
|
set(CMAKE_DATA_DIR_DESC "data")
|
|
|
|
set(CMAKE_DOC_DIR_DESC "docs")
|
|
|
|
set(CMAKE_MAN_DIR_DESC "man pages")
|
2015-12-21 18:02:11 +03:00
|
|
|
set(CMAKE_XDGDATA_DIR_DESC "XDG specific files")
|
2013-09-26 22:13:38 +04:00
|
|
|
|
|
|
|
foreach(v
|
2016-05-27 17:03:43 +03:00
|
|
|
CMAKE_BIN_DIR
|
2013-09-26 22:13:38 +04:00
|
|
|
CMAKE_DATA_DIR
|
|
|
|
CMAKE_DOC_DIR
|
|
|
|
CMAKE_MAN_DIR
|
2015-12-21 18:02:11 +03:00
|
|
|
CMAKE_XDGDATA_DIR
|
2013-09-26 22:13:38 +04:00
|
|
|
)
|
|
|
|
# Populate the cache with empty values so we know when the user sets them.
|
|
|
|
set(${v} "" CACHE STRING "")
|
|
|
|
set_property(CACHE ${v} PROPERTY HELPSTRING
|
|
|
|
"Location under install prefix for ${${v}_DESC} (default \"${${v}_DEFAULT}\")"
|
|
|
|
)
|
|
|
|
set_property(CACHE ${v} PROPERTY ADVANCED 1)
|
|
|
|
|
|
|
|
# Use the default when the user did not set this variable.
|
|
|
|
if(NOT ${v})
|
|
|
|
set(${v} "${${v}_DEFAULT}")
|
|
|
|
endif()
|
|
|
|
# Remove leading slash to treat as relative to install prefix.
|
|
|
|
string(REGEX REPLACE "^/" "" ${v} "${${v}}")
|
|
|
|
endforeach()
|