aboutsummaryrefslogtreecommitdiff
path: root/modules/FindKDE4Internal.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-07-21 19:19:06 +0000
committerAlexander Neundorf <neundorf@kde.org>2008-07-21 19:19:06 +0000
commit80377f8c74f047b0adefdcfa13d6340dbdaf98e7 (patch)
tree8d04c06a38a2781b0c5bd103961162014911a188 /modules/FindKDE4Internal.cmake
parent4e0138ca6cd56722c140c22c31b838d420173744 (diff)
downloadextra-cmake-modules-80377f8c74f047b0adefdcfa13d6340dbdaf98e7.tar.gz
extra-cmake-modules-80377f8c74f047b0adefdcfa13d6340dbdaf98e7.tar.bz2
-also disable _KDE4_TARGET_LINK_INTERFACE_LIBRARIES() and use the renamed LINK_INTERFACE_LIBRARIES target property
instead: set_target_properties(foo PROPERTIES ${KDE4_DISABLE_PROPERTY_}LINK_INTERFACE_LIBRARIES "kdeui;kdecore" ) While this doesn't look very nice, it is completely forward and backward compatible (i.e. cmake 2.4 doesn't complain, cmake 2.6 works, both versions work as soon as the reduced link interface is the default (soon), if somebody uses this with kdelibs which don't have that anymore he will get the reduced interface instead of errors, so all should be ok) Alex CCMAIL: mueller@kde.org svn path=/trunk/KDE/kdelibs/; revision=836131
Diffstat (limited to 'modules/FindKDE4Internal.cmake')
-rw-r--r--modules/FindKDE4Internal.cmake17
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index ee0100eb..abe6bea3 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -493,9 +493,24 @@ option(KDE4_ENABLE_FINAL "Enable final all-in-one compilation")
option(KDE4_BUILD_TESTS "Build the tests")
option(KDE4_ENABLE_HTMLHANDBOOK "Create targets htmlhandbook for creating the html versions of the docbook docs")
-# this one enables the smaller link interface for libs on UNIX (exceot OSX)
+# this one enables the smaller link interface for libs on UNIX
+set(KDE4_DISABLE_PROPERTY_ )
if(UNIX )# AND NOT APPLE)
option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE)
+ # The purpose of the KDE4_DISABLE_PROPERTY_ variable is to be used as a prefix for
+ # the target property LINK_INTERFACE_LIBRARIES. If it is empty, the property will have its
+ # correct name, if it's not empty, it will be a different name, i.e. the actual property
+ # will not be set, i.e. disabled. See kdelibs/kdecore/CMakeLists.txt for an example.
+ # This will be removed again as soon as we require cmake >= 2.6.0.
+ # If enabled, make it empty, so the property will keep it's actual name.
+ if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT)
+ set(KDE4_DISABLE_PROPERTY_ )
+ else (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT)
+ # If disabled, make it non-empty, so the property name will change from "LINK_INTERFACE_LIBRARIES"
+ # to "DISABLED_LINK_INTERFACE_LIBRARIES", which is a different (non-existing) target property, and so
+ # setting that property won't have an effect
+ set(KDE4_DISABLE_PROPERTY_ "DISABLED_")
+ endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT)
endif(UNIX)# AND NOT APPLE)