summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GNUInstallDirs
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2015-06-15 18:16:57 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-18 12:59:34 (GMT)
commitc8bd37ec685c02736618af83ac894e96fc1e6ab8 (patch)
tree49f6721e20ea3baa778f0649cdb3f30430819e06 /Tests/RunCMake/GNUInstallDirs
parent5f30f1754ac9a701cbd311bab86250dd237d86fd (diff)
downloadCMake-c8bd37ec685c02736618af83ac894e96fc1e6ab8.zip
CMake-c8bd37ec685c02736618af83ac894e96fc1e6ab8.tar.gz
CMake-c8bd37ec685c02736618af83ac894e96fc1e6ab8.tar.bz2
GNUInstallDirs: Add special cases for certain prefixes
Teach the module to handle SYSCONFDIR and LOCALSTATEDIR properly if CMAKE_INSTALL_PREFIX is set to `/` or `/usr` -- i.e. as expected by GNU Coding Standard (i.e. set SYSCONFDIR to `/etc` and `LOCALSTATEDIR` to `/var`). Also if CMAKE_INSTALL_PREFIX is set to /opt/pkg, `SYSCONFDIR` must be set to `/etc/opt/pkg` and `LOCALSTATEDIR` to `/var/opt/pkg` according to FHS.
Diffstat (limited to 'Tests/RunCMake/GNUInstallDirs')
-rw-r--r--Tests/RunCMake/GNUInstallDirs/Opt-stderr.txt4
-rw-r--r--Tests/RunCMake/GNUInstallDirs/Root-stderr.txt52
-rw-r--r--Tests/RunCMake/GNUInstallDirs/Usr-stderr.txt4
3 files changed, 30 insertions, 30 deletions
diff --git a/Tests/RunCMake/GNUInstallDirs/Opt-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Opt-stderr.txt
index f24a103..aee8552 100644
--- a/Tests/RunCMake/GNUInstallDirs/Opt-stderr.txt
+++ b/Tests/RunCMake/GNUInstallDirs/Opt-stderr.txt
@@ -21,8 +21,8 @@ CMAKE_INSTALL_FULL_INFODIR='/opt/Opt/share/info'
CMAKE_INSTALL_FULL_LIBDIR='/opt/Opt/(lib|lib64)'
CMAKE_INSTALL_FULL_LIBEXECDIR='/opt/Opt/libexec'
CMAKE_INSTALL_FULL_LOCALEDIR='/opt/Opt/share/locale'
-CMAKE_INSTALL_FULL_LOCALSTATEDIR='/opt/Opt/var'
+CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var/opt/Opt'
CMAKE_INSTALL_FULL_MANDIR='/opt/Opt/share/man'
CMAKE_INSTALL_FULL_SBINDIR='/opt/Opt/sbin'
CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/opt/Opt/com'
-CMAKE_INSTALL_FULL_SYSCONFDIR='/opt/Opt/etc'$
+CMAKE_INSTALL_FULL_SYSCONFDIR='/etc/opt/Opt'$
diff --git a/Tests/RunCMake/GNUInstallDirs/Root-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Root-stderr.txt
index 95ca1e5..a95400e 100644
--- a/Tests/RunCMake/GNUInstallDirs/Root-stderr.txt
+++ b/Tests/RunCMake/GNUInstallDirs/Root-stderr.txt
@@ -1,28 +1,28 @@
-^CMAKE_INSTALL_BINDIR='bin'
-CMAKE_INSTALL_DATADIR='share'
-CMAKE_INSTALL_DATAROOTDIR='share'
-CMAKE_INSTALL_DOCDIR='share/doc/Root'
-CMAKE_INSTALL_INCLUDEDIR='include'
-CMAKE_INSTALL_INFODIR='share/info'
-CMAKE_INSTALL_LIBDIR='(lib|lib64)'
-CMAKE_INSTALL_LIBEXECDIR='libexec'
-CMAKE_INSTALL_LOCALEDIR='share/locale'
+^CMAKE_INSTALL_BINDIR='usr/bin'
+CMAKE_INSTALL_DATADIR='usr/share'
+CMAKE_INSTALL_DATAROOTDIR='usr/share'
+CMAKE_INSTALL_DOCDIR='usr/share/doc/Root'
+CMAKE_INSTALL_INCLUDEDIR='usr/include'
+CMAKE_INSTALL_INFODIR='usr/share/info'
+CMAKE_INSTALL_LIBDIR='usr/(lib|lib64)'
+CMAKE_INSTALL_LIBEXECDIR='usr/libexec'
+CMAKE_INSTALL_LOCALEDIR='usr/share/locale'
CMAKE_INSTALL_LOCALSTATEDIR='var'
-CMAKE_INSTALL_MANDIR='share/man'
-CMAKE_INSTALL_SBINDIR='sbin'
-CMAKE_INSTALL_SHAREDSTATEDIR='com'
+CMAKE_INSTALL_MANDIR='usr/share/man'
+CMAKE_INSTALL_SBINDIR='usr/sbin'
+CMAKE_INSTALL_SHAREDSTATEDIR='usr/com'
CMAKE_INSTALL_SYSCONFDIR='etc'
-CMAKE_INSTALL_FULL_BINDIR='//bin'
-CMAKE_INSTALL_FULL_DATADIR='//share'
-CMAKE_INSTALL_FULL_DATAROOTDIR='//share'
-CMAKE_INSTALL_FULL_DOCDIR='//share/doc/Root'
-CMAKE_INSTALL_FULL_INCLUDEDIR='//include'
-CMAKE_INSTALL_FULL_INFODIR='//share/info'
-CMAKE_INSTALL_FULL_LIBDIR='//(lib|lib64)'
-CMAKE_INSTALL_FULL_LIBEXECDIR='//libexec'
-CMAKE_INSTALL_FULL_LOCALEDIR='//share/locale'
-CMAKE_INSTALL_FULL_LOCALSTATEDIR='//var'
-CMAKE_INSTALL_FULL_MANDIR='//share/man'
-CMAKE_INSTALL_FULL_SBINDIR='//sbin'
-CMAKE_INSTALL_FULL_SHAREDSTATEDIR='//com'
-CMAKE_INSTALL_FULL_SYSCONFDIR='//etc'$
+CMAKE_INSTALL_FULL_BINDIR='/usr/bin'
+CMAKE_INSTALL_FULL_DATADIR='/usr/share'
+CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/share'
+CMAKE_INSTALL_FULL_DOCDIR='/usr/share/doc/Root'
+CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/include'
+CMAKE_INSTALL_FULL_INFODIR='/usr/share/info'
+CMAKE_INSTALL_FULL_LIBDIR='/usr/(lib|lib64)'
+CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/libexec'
+CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale'
+CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var'
+CMAKE_INSTALL_FULL_MANDIR='/usr/share/man'
+CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin'
+CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com'
+CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$
diff --git a/Tests/RunCMake/GNUInstallDirs/Usr-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Usr-stderr.txt
index d857720..e10c4c5 100644
--- a/Tests/RunCMake/GNUInstallDirs/Usr-stderr.txt
+++ b/Tests/RunCMake/GNUInstallDirs/Usr-stderr.txt
@@ -21,8 +21,8 @@ CMAKE_INSTALL_FULL_INFODIR='/usr/share/info'
CMAKE_INSTALL_FULL_LIBDIR='/usr/(lib|lib64|lib/arch)'
CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/libexec'
CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale'
-CMAKE_INSTALL_FULL_LOCALSTATEDIR='/usr/var'
+CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var'
CMAKE_INSTALL_FULL_MANDIR='/usr/share/man'
CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin'
CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com'
-CMAKE_INSTALL_FULL_SYSCONFDIR='/usr/etc'$
+CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$