<div dir="ltr"><div>Thanks Nils,<br><br></div><div>It makes perfect sense with your explanation! Did not know anything about this RPATH family of variables before.<br><br></div><div>Cheers and thanks again<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 13, 2015 at 11:28 AM, Nils Gladitz <span dir="ltr"><<a href="mailto:nilsgladitz@gmail.com" target="_blank">nilsgladitz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 02/12/2015 06:40 PM, Sergio Vera wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear CMake users,<br>
<br>
I'm developing an app using CMake in Fedora 20 and so far it's working<br>
properly in the build directory.<br>
However, I've recently added some Install target commands so I can<br>
prepare it for packaging with CPack.<br>
However, when I "make install" my app, the application no longer runs<br>
and complains about missing shared libraries.<br>
<br>
With ldd I can see that the binary in my build dir do references system<br>
libraries and my 3rd party dependencies, which I have built with cmake<br>
too (CTK and VTK)<br>
<br>
However my Install folder binary does  not list any shared library to my<br>
CTK or VTK libs.<br>
<br>
I'm a bit puzzled by this behavior... Copying the build binary to the<br>
install folder works, but still I would like to know what is missing here.<br>
</blockquote>
<br></span>
The default behavior on Linux is that CMake manages two sets of RPATHs; build time and install time.<br>
<br>
The build time RPATHs are autogenerated to conveniently allow you to run your binaries from your build tree.<br>
<br>
At installation time the build time RPATHs are replaced with installation time RPATHs (which per default are empty).<br>
<br>
This is since when you deploy your applications you don't normally want RPATHs that refer to locations which are only valid on your own development system.<br>
<br>
You can adjust the behavior with the CMake variables that have RPATH in their name [1].<br>
<br>
Assuming you only intend to deploy locally and your shared libraries aren't being added to the installation itself INSTALL_RPATH_USE_LINK_PATH [2]  might be what you are looking for.<br>
<br>
Nils<br>
<br>
[1] <a href="http://www.cmake.org/cmake/help/v3.1/manual/cmake-variables.7.html" target="_blank">http://www.cmake.org/cmake/<u></u>help/v3.1/manual/cmake-<u></u>variables.7.html</a><br>
<br>
[2] <a href="http://www.cmake.org/cmake/help/v3.1/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.html" target="_blank">http://www.cmake.org/cmake/<u></u>help/v3.1/variable/CMAKE_<u></u>INSTALL_RPATH_USE_LINK_PATH.<u></u>html</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com">www.alma3d.com</a></div>
</div>