diff options
author | Brad King <brad.king@kitware.com> | 2022-03-30 15:45:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-03-30 15:51:01 (GMT) |
commit | 624ec3692f91788d84f9dc2b08573286bdef2cc9 (patch) | |
tree | 74847719bd2f85cf3fb42b5c3bedb084bde289f0 /Modules/GNUInstallDirs.cmake | |
parent | 00677703d00f94702ef94d8dd07387c8405a3caf (diff) | |
download | CMake-624ec3692f91788d84f9dc2b08573286bdef2cc9.zip CMake-624ec3692f91788d84f9dc2b08573286bdef2cc9.tar.gz CMake-624ec3692f91788d84f9dc2b08573286bdef2cc9.tar.bz2 |
GNUInstallDirs: Revert "Apply Debian multiarch LIBDIR to more prefixes"
Revert commit dd9584b352 (GNUInstallDirs: Apply Debian multiarch LIBDIR
to more prefixes, 2021-11-19, v3.23.0-rc1~323^2). There are separate
problems with activating multiarch `LIBDIR` for each prefix it added:
* Prefix `/` is often used to stage an installation with `DESTDIR`
for inclusion in a tarball package or similar.
* Prefix `/usr/local` is the default `CMAKE_INSTALL_PREFIX`, causing
the multiarch `LIBDIR` to be cached after the first configuration,
even if the prefix changes later.
Revert the change for now, except for the documentation update.
Further discussion will be needed to select a way to enable
multiarch `LIBDIR` for `/` and `/usr/local`.
Fixes: #23365
Issue: #19698
Diffstat (limited to 'Modules/GNUInstallDirs.cmake')
-rw-r--r-- | Modules/GNUInstallDirs.cmake | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index 4e7f87b..bd72901 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake @@ -55,7 +55,7 @@ where ``<dir>`` is one of: object code libraries (``lib`` or ``lib64``) On Debian, this may be ``lib/<multiarch-tuple>`` when - :variable:`CMAKE_INSTALL_PREFIX` is ``/``, ``/usr``, or ``/usr/local``. + :variable:`CMAKE_INSTALL_PREFIX` is ``/usr``. ``INCLUDEDIR`` C header files (``include``) ``OLDINCLUDEDIR`` @@ -273,9 +273,7 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR OR (_libdir_set if(__system_type_for_install STREQUAL "debian") if(CMAKE_LIBRARY_ARCHITECTURE) - if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/" - OR "${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$" - OR "${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/local/?$") + if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$") set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}") endif() if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX |