[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-buildsystem
Subject:    RPATH problems in kdelibs
From:       neundorf () kde ! org (Alexander Neundorf)
Date:       2006-12-10 22:34:54
Message-ID: 200612102334.54970.neundorf () kde ! org
[Download RAW message or body]

On Saturday 09 December 2006 22:14, Thiago Macieira wrote:
> Thiago Macieira wrote:
> >Note that there's only one RPATH entry there. Why isn't Qt's libdir
> > being added?
>
> The following ugly patch is a workaround (for gcc only). I believe the
> problem is in CMake: TARGET_LINK_LIBRARIES should be automatically adding
> the RPATH components, but isn't doing so.

It does if you set the RPATH related target properties correctly:

set(CMAKE_INSTALL_RPATH ${LIB_INSTALL_DIR} )
set(CMAKE_SKIP_BUILD_RPATH TRUE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

The last option is the one which makes cmake automatically use the paths to 
all used libs as RPATH. Yes, this is probably the most complicated 
combination of settings you have to do anywhere in cmake.

Or for a single target to override the defaults:

set_target_properties(kdewidgets PROPERTIES 
   INSTALL_RPATH ${LIB_INSTALL_DIR}
   SKIP_BUILD_RPATH TRUE
   BUILD_WITH_INSTALL_RPATH TRUE
   INSTALL_RPATH_USE_LINK_PATH TRUE)

I committed this as patch to kdelibs/kdewidgets/CMakeLists.txt
I also added an option KDE4_USE_ALWAYS_FULL_RPATH to FindKDE4Internal.cmake. 
If you set this to TRUE, everything will be linked with the full RPATH.

Did you have luck with looking for a RPATH-editing tool ?

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic