FindKDE4Internal.cmake: better rpath handling

Alexander Neundorf neundorf at kde.org
Mon Jan 24 21:27:30 CET 2011


On Monday 24 January 2011, Rex Dieter wrote:
> Rex Dieter wrote:
> > On 01/24/2011 12:25 PM, Alexander Neundorf wrote:
> >> So what you want is that CMAKE_INSTALL_RPATH_USE_LINK_PATH does not
> >> include any directories listed in
> >> CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES ? I think this is related to
> >> this bug report here: http://public.kitware.com/Bug/view.php?id=10238
> >>
> >> Either reopen it or create a new one, since it has a slightly different
> >> topic.
> >
> > Yes! That's precisely what I'm after.  will do.
>
> OK, per
> http://public.kitware.com/Bug/view.php?id=11751#c25029
>
> So, some options to consider:
>
> 1.  we/kde could add a helper macro something along the lines of:
>
> macro(kde4_append_install_rpath dir)
>   list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${dir}" _isSystem)
>   if("${_isSystem}" LESS 0)
>     list(APPEND CMAKE_INSTALL_RPATH "${path}")
>   endif()
> endmacro()
>
> and replace every common use of
> set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
> with
> kde4_append_install_rpath("${LIB_INSTALL_DIR}")

Serious question: do you think that's worth it ?
This only needs to be done by projects which are not using kdelibs, right ?
They have to take care themselves, which means right now copying the 4 lines 
of code, and with the macro they would have to copy the macro and call it 
once.

Also it doesn't change anything about the USE_LINK_PATH issue.

> 2.  copy-n-paste the aforementioned code all over (similiar to what's
> already in FindKDEInternal)
>
>
> 3.  wait for cmake to handle this better natively

I think it's option 3.

Alex


More information about the Kde-buildsystem mailing list