From f52bf584332ce5904ed5f6b2c8a4a00cec695b01 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 6 Aug 2008 20:44:05 +0000 Subject: -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 --- modules/FindKDE4Internal.cmake | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'modules') 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 ########### -- cgit v1.2.1