ENH: Changing default data and doc directories to share/cmake-V.v and doc/cmake-V.v instead of share/CMake and doc/CMake for consistency with many linux distribution conventions.
This commit is contained in:
parent
a2e3b01a59
commit
6e2f819942
|
@ -15,9 +15,9 @@ SET(BUILD_SHARED_LIBS OFF)
|
||||||
# install tree.
|
# install tree.
|
||||||
SET(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.")
|
SET(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.")
|
||||||
|
|
||||||
SET(CMAKE_DATA_DIR "/share/CMake" CACHE STRING
|
SET(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}" CACHE STRING
|
||||||
"Install location for data (relative to prefix).")
|
"Install location for data (relative to prefix).")
|
||||||
SET(CMAKE_DOC_DIR "/doc/CMake" CACHE STRING
|
SET(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION}" CACHE STRING
|
||||||
"Install location for documentation (relative to prefix).")
|
"Install location for documentation (relative to prefix).")
|
||||||
SET(CMAKE_MAN_DIR "/man" CACHE STRING
|
SET(CMAKE_MAN_DIR "/man" CACHE STRING
|
||||||
"Install location for man pages (relative to prefix).")
|
"Install location for man pages (relative to prefix).")
|
||||||
|
|
13
bootstrap
13
bootstrap
|
@ -17,14 +17,23 @@
|
||||||
#
|
#
|
||||||
#=========================================================================
|
#=========================================================================
|
||||||
|
|
||||||
|
# Version number extraction function.
|
||||||
|
cmake_version_component()
|
||||||
|
{
|
||||||
|
cat "${cmake_source_dir}/CMakeLists.txt" | sed -n "
|
||||||
|
/^SET(CMake_VERSION_${1}/ {s/SET(CMake_VERSION_${1} *\([0-9]*\))/\1/;p;}
|
||||||
|
"
|
||||||
|
}
|
||||||
|
|
||||||
# Detect system and directory information.
|
# Detect system and directory information.
|
||||||
cmake_system=`uname`
|
cmake_system=`uname`
|
||||||
cmake_source_dir=`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'`
|
cmake_source_dir=`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'`
|
||||||
cmake_source_dir=`(cd "${cmake_source_dir}";pwd)`
|
cmake_source_dir=`(cd "${cmake_source_dir}";pwd)`
|
||||||
cmake_binary_dir=`pwd`
|
cmake_binary_dir=`pwd`
|
||||||
cmake_bootstrap_dir="${cmake_binary_dir}/Bootstrap.cmk"
|
cmake_bootstrap_dir="${cmake_binary_dir}/Bootstrap.cmk"
|
||||||
cmake_data_dir="/share/CMake"
|
cmake_version="`cmake_version_component MAJOR`.`cmake_version_component MINOR`"
|
||||||
cmake_doc_dir="/doc/CMake"
|
cmake_data_dir="/share/cmake-${cmake_version}"
|
||||||
|
cmake_doc_dir="/doc/cmake-${cmake_version}"
|
||||||
cmake_man_dir="/man"
|
cmake_man_dir="/man"
|
||||||
cmake_init_file=""
|
cmake_init_file=""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue