[CMake] Problem with CMAKE_INSTALL_RPATH_USE_LINK_PATH ?
Roland Rasmussen
rasmussen74 at googlemail.com
Thu Oct 23 02:10:56 EDT 2008
On Wed, Oct 22, 2008 at 9:33 PM, Alexander Neundorf
<a.neundorf-work at gmx.net> wrote:
>> 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.
Okay, I tried that, but it does not change anything. BTW, for the sake
of completeness this is with CMake 2.6.2.
> 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).
That is probably correct, but I don't think this is the problem here.
In fact, the library that I am trying to get RPATH'ed into the binary
sits in /opt/std/4.2.4/snos/lib64. If I dump the contents of
CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES I get
"/lib;/usr/lib;/usr/lib32;/usr/lib64".
Any other ideas as to why the RPATH isn't getting set in the binary?
Regards,
Roland
More information about the CMake
mailing list