<table><tr><td style="">kossebau created this revision.<br />kossebau added reviewers: Marble, rahn, nienhueser, shentey.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D3358" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>When installing marble to a non-standard system directory<br />
the executable loader needs to be informed about the location of the<br />
marble libraries. Until now for marble executables this needs to be done<br />
via the env var LD_LIBRARY_PATH, which has the disadvantage of needing<br />
to be done as explicit separate step and also affects other executables<br />
which see this env var.<br />
Instead the custom locations of linked libraries can be tagged within<br />
the executable, via the RPATH (or RUNPATH) entries, which then is<br />
automatically available and also only valid for the given executable.</p>

<p>Libmarblewidget only works with data & plugins in installation folders.<br />
So when running executables from the build dir (apps, tools, tests)<br />
linked to libraries from the build dir, for one things might not work<br />
due to not yet installed data/plugins. Or there are API/ABI-related<br />
changes done but without reinstallation, so installed plugins and<br />
libraries in the build dir are incompatible and will fail with<br />
strange behaviour.<br />
To protect against that some more when linking the executables<br />
in the build dir the RPATH can be set already to the installation<br />
location only, so the versions of the libraries in the build dir<br />
will not be seen and at least libraries and plugins are consistent.</p>

<p>More info e.g. here:<br />
<a href="https://cmake.org/Wiki/CMake_RPATH_handling" class="remarkup-link" target="_blank" rel="noreferrer">https://cmake.org/Wiki/CMake_RPATH_handling</a><br />
<a href="http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html" class="remarkup-link" target="_blank" rel="noreferrer">http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html</a></p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rMARBLE Marble</div></div></div><br /><div><strong>BRANCH</strong><div><div>useRPathWithApps</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D3358" rel="noreferrer">https://phabricator.kde.org/D3358</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
MarbleMacros.cmake<br />
src/lib/marble/declarative/CMakeLists.txt</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>kossebau, Marble, rahn, nienhueser, shentey<br /><strong>Cc: </strong>marble-devel<br /></div>