summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-11-22 16:20:24 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-11-22 16:20:43 (GMT)
commit1cbb956b34b6418f200080180446d15e17a59e8b (patch)
treef4cb1af76e106c166893f5805377adc56d88beec /Modules
parent164fc9c5e5d87e0473f30d0846081037f41e04ca (diff)
parentdd9584b352169f8050bd3b64caf3470b81ffafc9 (diff)
downloadCMake-1cbb956b34b6418f200080180446d15e17a59e8b.zip
CMake-1cbb956b34b6418f200080180446d15e17a59e8b.tar.gz
CMake-1cbb956b34b6418f200080180446d15e17a59e8b.tar.bz2
Merge topic 'GNUInstallDirs-multiarch-prefixes'
dd9584b352 GNUInstallDirs: Apply Debian multiarch LIBDIR to more prefixes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6748
Diffstat (limited to 'Modules')
-rw-r--r--Modules/GNUInstallDirs.cmake10
1 files changed, 7 insertions, 3 deletions
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake
index 6ca424a..489c233 100644
--- a/Modules/GNUInstallDirs.cmake
+++ b/Modules/GNUInstallDirs.cmake
@@ -52,8 +52,10 @@ where ``<dir>`` is one of:
.. versionadded:: 3.9
run-time variable data (``LOCALSTATEDIR/run``)
``LIBDIR``
- object code libraries (``lib`` or ``lib64``
- or ``lib/<multiarch-tuple>`` on Debian)
+ object code libraries (``lib`` or ``lib64``)
+
+ On Debian, this may be ``lib/<multiarch-tuple>`` when
+ :variable:`CMAKE_INSTALL_PREFIX` is ``/``, ``/usr``, or ``/usr/local``.
``INCLUDEDIR``
C header files (``include``)
``OLDINCLUDEDIR``
@@ -269,7 +271,9 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR OR (_libdir_set
if(__system_type_for_install STREQUAL "debian")
if(CMAKE_LIBRARY_ARCHITECTURE)
- if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
+ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/"
+ OR "${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$"
+ OR "${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/local/?$")
set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX