aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-08-06 20:44:05 +0000
committerAlexander Neundorf <neundorf@kde.org>2008-08-06 20:44:05 +0000
commitf52bf584332ce5904ed5f6b2c8a4a00cec695b01 (patch)
tree60a7caf8b01c4fd6bc97d29924abb43a6f64ea8b
parenta5ee1f9b369e753b88143329a289e437f0a7f272 (diff)
downloadextra-cmake-modules-f52bf584332ce5904ed5f6b2c8a4a00cec695b01.tar.gz
extra-cmake-modules-f52bf584332ce5904ed5f6b2c8a4a00cec695b01.tar.bz2
-initialize LIB_SUFFIX to 64 (or 32) if kdelibs have been installed to lib64 (or lib32)
Does anybody think this might be a bad idea or cause problems under some weird circumstances ? Alex CCMAIL: kde-buildsystem@kde.org svn path=/trunk/KDE/kdelibs/; revision=843268
-rw-r--r--modules/FindKDE4Internal.cmake14
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index 3ab33147..6859f7dc 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -534,7 +534,19 @@ endif(KDE4_ENABLE_FINAL)
# info from "http://www.linuxfromscratch.org/hlfs/view/unstable/glibc/chapter02/pie.html"
option(KDE4_ENABLE_FPIE "Enable platform supports PIE linking")
-set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
+# If we are building ! kdelibs, check where kdelibs are installed.
+# If they are installed in a directory which contains "lib64", we default to "64" for LIB_SUFFIX,
+# so the current project will by default also go into lib64.
+# The same for lib32. Alex
+set(_Init_LIB_SUFFIX "")
+if ("${KDE4_LIB_DIR}" MATCHES lib64)
+ set(_Init_LIB_SUFFIX 64)
+endif ("${KDE4_LIB_DIR}" MATCHES lib64)
+if ("${KDE4_LIB_DIR}" MATCHES lib32)
+ set(_Init_LIB_SUFFIX 32)
+endif ("${KDE4_LIB_DIR}" MATCHES lib32)
+
+set(LIB_SUFFIX "${_Init_LIB_SUFFIX}" CACHE STRING "Define suffix of directory name (32/64)" )
########## the following are directories where stuff will be installed to ###########