From c4bb95ed550bd49ccb2d720d1a7788a1e7e0b045 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Tue, 17 Sep 2013 23:05:52 +0200 Subject: [PATCH] Add special variable for MultiArch-unaware components Some components are not yet MultiArch-aware and installs to either lib/ (Debian) or lib64/ (RHEL) on 64-bit platforms. If we need to interface with these components, then it is nice to have such a variable set together with the regular detection code. --- cmake/Modules/UseMultiArch.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmake/Modules/UseMultiArch.cmake b/cmake/Modules/UseMultiArch.cmake index f1a5d665..87f0a76e 100644 --- a/cmake/Modules/UseMultiArch.cmake +++ b/cmake/Modules/UseMultiArch.cmake @@ -8,17 +8,20 @@ # Note that it will override the results of GNUInstallDirs if included after # that module. -# Fedora uses lib64/ for 64-bit systems, Debian uses lib/x86_64-linux-gnu; -# Fedora put module files in lib64/ too, but Debian uses lib/ for that +# default if we need to put something in the library directory for a +# component that is *not* multiarch-aware +set (LIBDIR_MULTIARCH_UNAWARE "lib") + +# Fedora uses lib64/ for 64-bit systems, Debian uses lib/x86_64-linux-gnu if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") # Debian or Ubuntu? if (EXISTS "/etc/debian_version") set (_libdir_def "lib/${CMAKE_LIBRARY_ARCHITECTURE}") - set (_libdir_noarch "lib") else (EXISTS "/etc/debian_version") # 64-bit system? if (CMAKE_SIZEOF_VOID_P EQUAL 8) set (_libdir_def "lib64") + set (LIBDIR_MULTIARCH_UNAWARE "${_libdir_def}") else (CMAKE_SIZEOF_VOID_P EQUAL 8) set (_libdir_def "lib") endif (CMAKE_SIZEOF_VOID_P EQUAL 8)