aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/FindKDE4Internal.cmake23
-rw-r--r--modules/KDE4Macros.cmake6
2 files changed, 24 insertions, 5 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index 044bb4f3..34b67ac2 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -493,12 +493,33 @@ 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 use the reduced link interface as default.
+ # This won't cause any incompatibilties then because then cmake files which still
+ # have that prefix will work, since that prefix will just be empty.
+ #
+ # 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)
+
+
if( KDE4_ENABLE_FINAL)
add_definitions(-DKDE_USE_FINAL)
endif(KDE4_ENABLE_FINAL)
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index c30973da..768a36e2 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -1117,13 +1117,11 @@ macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename)
endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES)
macro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs)
- if(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX )# AND NOT APPLE)
- set_target_properties("${_target}" PROPERTIES LINK_INTERFACE_LIBRARIES "${_interface_libs}")
- endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE)
+ message(FATAL_ERROR "_KDE4_TARGET_LINK_INTERFACE_LIBRARIES() doesn't exist anymore. Set the LINK_INTERFACE_LIBRARIES target property instead. See kdelibs/kdecore/CMakeLists.txt for an example.")
endmacro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES)
macro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs)
- message(FATAL_ERROR "KDE4_TARGET_LINK_INTERFACE_LIBRARIES() has been renamed to _KDE4_TARGET_LINK_INTERFACE_LIBRARIES(), so use that instead")
+ message(FATAL_ERROR "KDE4_TARGET_LINK_INTERFACE_LIBRARIES() doesn't exist anymore. Set the LINK_INTERFACE_LIBRARIES target property instead. See kdelibs/kdecore/CMakeLists.txt for an example.")
endmacro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs)
macro (KDE4_INSTALL_HANDBOOK _lang)