<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr">I am trying to create a standalone build of our application on Linux. We are currently building on a mix of Mint 17 and Ubuntu 14.04. I have been doing a lot of reading about rpath, runpath and chrpath. The only way it would seem to get this done is to adjust the rpath via the "chrpath" tool. The issue is that during packaging, cmake is removing the rpath from the binaries which kills the process of using chrpath. I have looked at the various *_RPATH* cmake variables but none of the combinations seem to work correctly. CMake always strips the rpath from the binaries. This is with a Qt5 application which compiles against the Qt 5.4.1 version which is installed from the Qt.io website.</div></blockquote><div><div>Have you tried only setting the INSTALL_RPATH property on the targets?</div><div>Or setting the CMAKE_INSTALL_RPATH in your top level CMakeLists.txt file.</div><div><br></div><div>For example:</div><div><p style="margin: 0px; font-size: 11px; font-family: Menlo; color: #34bbc7;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo; color: #34bbc7;"><span style="color: #ce7924;" data-mce-style="color: #ce7924;">if</span>(CMAKE_SYSTEM_NAME <span style="color: #ce7924;" data-mce-style="color: #ce7924;">MATCHES</span> <span style="color: #c33720;" data-mce-style="color: #c33720;">"Linux"</span>)</p><p style="margin: 0px; font-size: 11px; font-family: Menlo; color: #34bbc7;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo; color: #34bbc7;"><span style="color: #000000;" data-mce-style="color: #000000;">  </span><span style="color: #ce7924;" data-mce-style="color: #ce7924;">set</span>(CMAKE_<span style="color: #00a6b2; background-color: #e6e600;" data-mce-style="color: #00a6b2; background-color: #e6e600;">INSTALL</span>_RPATH <span style="color: #c33720;" data-mce-style="color: #c33720;">"\$ORIGIN"</span>)</p><p style="margin: 0px; font-size: 11px; font-family: Menlo; color: #34bbc7;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo; color: #34bbc7;"><span style="color: #ce7924;" data-mce-style="color: #ce7924;">endif</span>()</p></div><div><br></div><div>That alone should be enough to give you rpaths in the install tree.</div><div><br></div><div>Clint</div></div></div></body></html>