aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/FindKDE4Internal.cmake2
-rw-r--r--modules/KDE4Macros.cmake4
2 files changed, 4 insertions, 2 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index 014f092b..2bc441d0 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -565,6 +565,8 @@ endif (WIN32)
# also use /usr/local by default under UNIX, including Mac OS X
if (UNIX)
+ option(KDE4_USE_ALWAYS_FULL_RPATH "If set to TRUE, also libs and plugins will be linked with the full RPATH, which will usually make them work better, but make install will take longer." OFF)
+
link_directories(/usr/local/lib)
set( _KDE4_PLATFORM_INCLUDE_DIRS /usr/local/include )
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index 1e3f75cf..b65c9568 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -409,9 +409,9 @@ endmacro (KDE4_CREATE_FINAL_FILES)
# If RPATH is not explicitely disabled, libraries and plugins are built without RPATH, in
# the hope that the RPATH which is compiled into the executable is good enough.
macro (KDE4_HANDLE_RPATH_FOR_LIBRARY _target_NAME)
- if (NOT CMAKE_SKIP_RPATH)
+ if (NOT CMAKE_SKIP_RPATH AND NOT KDE4_USE_ALWAYS_FULL_RPATH)
set_target_properties(${_target_NAME} PROPERTIES INSTALL_RPATH_USE_LINK_PATH FALSE SKIP_BUILD_RPATH TRUE BUILD_WITH_INSTALL_RPATH TRUE INSTALL_RPATH "")
- endif (NOT CMAKE_SKIP_RPATH)
+ endif (NOT CMAKE_SKIP_RPATH AND NOT KDE4_USE_ALWAYS_FULL_RPATH)
endmacro (KDE4_HANDLE_RPATH_FOR_LIBRARY)
# This macro sets the RPATH related options for executables