FindKDE4Internal.cmake: only conditionally set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)?
Alexander Neundorf
neundorf at kde.org
Mon Jan 24 19:25:19 CET 2011
Hi Rex,
On Friday 21 January 2011, Rex Dieter wrote:
> 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?
Yes. Not really good, unfortunately.
What CMAKE_INSTALL_RPATH_USE_LINK_PATH does is that it adds the directories
used for linking the executable to the RPATH of the installed executable.
E.g. if executable foo has been linked against /opt/bar/lib/libbar.so
and /home/alex/lib/libblub.so then /opt/bar/lib/ and /home/alex/lib/ are
added to the RPATH automatically.
Without that every developer would have to collect the directories of all used
libraries and add them manually to the INSTALL_RPATH (if they are outside the
system directories).
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.
Alex
More information about the Kde-buildsystem
mailing list