Thanks Nils,

It makes perfect sense with your explanation! Did not know anything about
this RPATH family of variables before.

Cheers and thanks again

On Fri, Feb 13, 2015 at 11:28 AM, Nils Gladitz <nilsglad...@gmail.com>
wrote:

> On 02/12/2015 06:40 PM, Sergio Vera wrote:
>
>> Dear CMake users,
>>
>> I'm developing an app using CMake in Fedora 20 and so far it's working
>> properly in the build directory.
>> However, I've recently added some Install target commands so I can
>> prepare it for packaging with CPack.
>> However, when I "make install" my app, the application no longer runs
>> and complains about missing shared libraries.
>>
>> With ldd I can see that the binary in my build dir do references system
>> libraries and my 3rd party dependencies, which I have built with cmake
>> too (CTK and VTK)
>>
>> However my Install folder binary does  not list any shared library to my
>> CTK or VTK libs.
>>
>> I'm a bit puzzled by this behavior... Copying the build binary to the
>> install folder works, but still I would like to know what is missing here.
>>
>
> The default behavior on Linux is that CMake manages two sets of RPATHs;
> build time and install time.
>
> The build time RPATHs are autogenerated to conveniently allow you to run
> your binaries from your build tree.
>
> At installation time the build time RPATHs are replaced with installation
> time RPATHs (which per default are empty).
>
> 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.
>
> You can adjust the behavior with the CMake variables that have RPATH in
> their name [1].
>
> 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.
>
> Nils
>
> [1] http://www.cmake.org/cmake/help/v3.1/manual/cmake-variables.7.html
>
> [2] http://www.cmake.org/cmake/help/v3.1/variable/CMAKE_
> INSTALL_RPATH_USE_LINK_PATH.html
>



-- 
Sergio Vera

 Alma IT Systems
 C/ Vilana, 4B, 4º 1ª
 08022 Barcelona
 T. (+34) 932 380 592
 www.alma3d.com
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to