On Wednesday 22 October 2008, Roland Rasmussen wrote:
> Hi!
>
> The way I read the documentation for CMAKE_INSTALL_RPATH_USE_LINK_PATH
> is that if it is TRUE, then the link paths for an executable will be
> put into the rpath when it is installed through the 'install' target.
> Is that correct?
>
> The problem is that it doesn't work as expected for me.
>
> The situation is that I have an executable 'johndoe' which requires a
> shared library, say libbar.so, which is found in the directory
> /lib/foo, ie. outside the build directory. So what I expected is that
> with
>
>   SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
>   SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
>   SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

What happens if you set CMAKE_BUILD_WITH_INSTALL_RPATH  to TRUE ?
Then it will be built with the install RPATH and won't have to be changed when 
installing.

But I think there may be special handling for /lib and /usr/lib, so that they 
are never included in the RPATH since they are standard directories. (at 
least they are in CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES, which is used for 
something like this).

Alex
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to