[CMake] Relink during install to get correct rpath in the binary?

Lars Nordlund lars.nordlund at hem.utfors.se
Sun Nov 20 08:05:20 EST 2005


Hello

I was under the impression that CMake automatically did a relink
against shared libraries during install? I can however not get that to
happen. I made a shared library and a binary which links against it.
The rpath is always pointing into my temporary tree of generated
makefiles and build results. Is there a CMake variable controlling this
behaviour?

libc_hello.so is built in the same CMakeLists.txt tree as
c_user_of_shared_lib.

%ldd /tmp/build/shared_libs/bin/c_user_of_shared_lib 
/tmp/build/shared_libs/bin/c_user_of_shared_lib:
        -lc_hello => /tmp/build/shared_libs/lib/libc_hello.so
        -lc.12 => /usr/lib/libc.so.12

%ldd /home/lars/util/bin/c_user_of_shared_lib 
/home/lars/util/bin/c_user_of_shared_lib:
        -lc_hello => /tmp/build/shared_libs/lib/libc_hello.so
        -lc.12 => /usr/lib/libc.so.12


Best regards,
	Lars Nordlund


More information about the CMake mailing list