Skip to content
Snippets Groups Projects
Commit d92bf9e8 authored by Brad King's avatar Brad King
Browse files

Enable RPATH for CMake's own binaries by default

Reconcile the changes made by:

* commit ae62f660 (ENH: CMake does not need RPATHs at all for its own executables, 2006-03-01, v2.4.0~380)
* commit a056cffc (COMP: enable RPATH if any of the CMAKE_USE_SYSTEM_XXX variables is enabled, 2007-08-28, v2.6.0~1183)
* commit c0108d1e (COMP: use RPATH is building QtDialog and the Qt libs are not in /lib or /usr/lib, 2007-11-05, v2.6.0~915)

The overall goal of those changes was to get the RPATH set for external
libraries when needed and also to avoid re-linking or other RPATH
editing on installation.  We can use a simpler approach to satisfy both
goals: always use RPATH entries for libraries found externally.  If
there are no such libraries we will get no RPATH.  If there are such
libraries that are not in standard paths we will get a RPATH that points
at them.  This will work for running either from the build tree or the
install tree, so we can use the same for both to avoid editing on
installation.

Fixes: #20185
parent 710371ca
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment