diff options
author | Brad King <brad.king@kitware.com> | 2020-10-09 13:38:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-09 13:38:20 (GMT) |
commit | 5f2e1f2f3dd2746b9f15413cdcf16ec6e851a2bb (patch) | |
tree | cb4abf4d0e7a4eb6fb35f77cf1f8961989b6d8b3 /Modules | |
parent | 488141fe373f9c4e1dfd3d63e9c932c37d577547 (diff) | |
parent | 798c1c319224c8b9ec6e4407e2c42375bd645235 (diff) | |
download | CMake-5f2e1f2f3dd2746b9f15413cdcf16ec6e851a2bb.zip CMake-5f2e1f2f3dd2746b9f15413cdcf16ec6e851a2bb.tar.gz CMake-5f2e1f2f3dd2746b9f15413cdcf16ec6e851a2bb.tar.bz2 |
Merge topic 'GNUInstallDirs-debian' into release-3.19
798c1c3192 GNUInstallDirs: Comply with Debian Policy on LIBEXECDIR
75bcd3cf54 Tests: Add RunCMake.GNUInstallDirs expected output specific to Debian
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5349
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/GNUInstallDirs.cmake | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index 9ef22b9..13d067a 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake @@ -167,8 +167,6 @@ _GNUInstallDirs_cache_path(CMAKE_INSTALL_BINDIR "bin" "User executables (bin)") _GNUInstallDirs_cache_path(CMAKE_INSTALL_SBINDIR "sbin" "System admin executables (sbin)") -_GNUInstallDirs_cache_path(CMAKE_INSTALL_LIBEXECDIR "libexec" - "Program executables (libexec)") _GNUInstallDirs_cache_path(CMAKE_INSTALL_SYSCONFDIR "etc" "Read-only single-machine data (etc)") _GNUInstallDirs_cache_path(CMAKE_INSTALL_SHAREDSTATEDIR "com" @@ -262,6 +260,19 @@ set(_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE IN unset(_libdir_set) unset(__LAST_LIBDIR_DEFAULT) +if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$" + AND NOT CMAKE_CROSSCOMPILING + AND NOT EXISTS "/etc/arch-release" + AND EXISTS "/etc/debian_version" # is this a debian system ? + AND "${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$") + # see https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrlibexec + # and https://www.debian.org/doc/debian-policy/ch-opersys#file-system-structure (section 9.1.1 bullet point 4) + _GNUInstallDirs_cache_path(CMAKE_INSTALL_LIBEXECDIR "${CMAKE_INSTALL_LIBDIR}" + "Program executables (${CMAKE_INSTALL_LIBDIR})") +else() + _GNUInstallDirs_cache_path(CMAKE_INSTALL_LIBEXECDIR "libexec" + "Program executables (libexec)") +endif() _GNUInstallDirs_cache_path(CMAKE_INSTALL_INCLUDEDIR "include" "C header files (include)") _GNUInstallDirs_cache_path(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" |