Historically in our fedora (and other distros) packaging, folks just brute 
force
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
to avoid the rpath mess in default prefixes.

But, with great hope I look forward to the day this all "just works", and we 
can avoid rpath'ing anything in 
CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
without much ado.  Attached is my latest attempt to accomplish that by 
conditinally doing
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
*only* if any non-implicit items are actually added to CMAKE_INSTALL_RPATH

Comments?

If something like this approach is acceptable, I'd like to go through all 
the kdesupport projects that copied the unconditional items
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH  TRUE)
set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
(from older versions of FindKDE4Internal.cmake) too.

-- Rex
diff -up kdelibs-4.5.95/cmake/modules/FindKDE4Internal.cmake.rpath-2 kdelibs-4.5.95/cmake/modules/FindKDE4Internal.cmake
--- kdelibs-4.5.95/cmake/modules/FindKDE4Internal.cmake.rpath-2	2011-01-21 11:55:51.051882940 -0600
+++ kdelibs-4.5.95/cmake/modules/FindKDE4Internal.cmake	2011-01-21 11:58:20.963202596 -0600
@@ -1040,11 +1040,11 @@ if (UNIX)
       list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" _isSystemLibDir)
       if("${_isSystemLibDir}" STREQUAL "-1")
          set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
+         set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
       endif("${_isSystemLibDir}" STREQUAL "-1")
 
       set(CMAKE_SKIP_BUILD_RPATH FALSE)
       set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-      set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
    endif (APPLE)
 endif (UNIX)
 

_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to