[CMake] embedded path in shared library linked into another shared library

Eric Noulard eric.noulard at gmail.com
Mon Apr 11 15:28:39 EDT 2011


2011/4/11 David Aiken <david.aiken at cis-vancouver.com>:
> Hi all..
>
>
>
> I’m using cmake 2.8.4 on Centos 5.2. I build a libUtility.so and a
> libSecurity.so which depends on it. The utility library is located in
> “../../lib/libUtility.so” during the build. If I do an ldd on libSecurity.so
> I can see this relative path for libUtility.so in both the build and install
> versions of the libSecurity.so library. I would like to remove it, but have
> had no luck. From the docs it seems that the rpath would be removed if I add
> “SET(CMAKE_SKIP_RPATH TRUE)” to the CMakeLists.txt, but there is no change.


As far as I understand this
http://www.cmake.org/Wiki/CMake_RPATH_handling

it should work with CMAKE_SKIP_RPATH set to TRUE
did you try using a fresh build tree?

You could try with:
SET(CMAKE_SKIP_BUILD_RPATH  TRUE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH "")


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list