[CMake] Relinking before installing

Brad King brad.king at kitware.com
Tue Oct 3 10:01:38 EDT 2006


Andrew Maclean wrote:
> In Linux, is it possible to relink libraries before installation?
> For instance if I have built with shared libraries on and
> CMAKE_SKIP_RPATH OFF then I have runtime paths in the shared libraries.
> When I finally decide to install a version for system-wide use (not
> development), then I want no runtime paths in the shared libraries or
> (preferably) the runtime path of where they are going to be installed.
>  
> Is it possible to do this? Has anyone got an example?

Read the docs for SET_TARGET_PROPERTIES.  It has a whole bunch of stuff
about RPATHs in both the build tree and the install tree.

In CMake 2.4 the default is to install with no rpath.  It does relink if
you built in the build tree with CMAKE_SKIP_RPATH set to OFF.

-Brad


More information about the CMake mailing list