diff options
author | Timo Röhling <roehling@debian.org> | 2021-10-07 17:45:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-10-07 18:29:18 (GMT) |
commit | 6658e260d481f5e51537cffefcd3aac6844d529d (patch) | |
tree | eaf29f73c462ca1187a585501ec7f7fd3abb0591 /Modules/GNUInstallDirs.cmake | |
parent | c9b27dace7e4110b25d5889e9c6952d0f4a7ca58 (diff) | |
download | CMake-6658e260d481f5e51537cffefcd3aac6844d529d.zip CMake-6658e260d481f5e51537cffefcd3aac6844d529d.tar.gz CMake-6658e260d481f5e51537cffefcd3aac6844d529d.tar.bz2 |
GNUInstallDirs: Fix misinterpretation of Debian Policy on LIBEXECDIR
Revert commit 798c1c3192 (GNUInstallDirs: Comply with Debian Policy on
LIBEXECDIR, 2020-10-08, v3.19.0-rc1~11^2).
The Debian Policy builds upon FHS 3.0 and permits installing to
`/usr/libexec`. While Policy does grant an additional exception for
applications to use a single subdirectory of `/usr/lib/<triplet>`, this
is not meant to replace `/usr/libexec` as valid target.
Fixes: #22731
Diffstat (limited to 'Modules/GNUInstallDirs.cmake')
-rw-r--r-- | Modules/GNUInstallDirs.cmake | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index 13d067a..9ef22b9 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake @@ -167,6 +167,8 @@ _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" @@ -260,19 +262,6 @@ 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" |