[CMake] padding link arguments to the linker
Brad King
brad.king at kitware.com
Wed Feb 8 19:39:00 EST 2006
Mike Jackson wrote:
> So if I turn on RPATH, and rpath uses -install_name, where do I
> actually specify the RPATH to use? or can I specify the path at all?
Enabling VTK_USE_RPATH is intended for developers to be able to run VTK
programs from the build tree without installing or setting any
environment variables. It always sets the install_name to point to the
full path to each library in the build tree. This is why installation
is disabled.
CMake does not currently support a user-configured rpath or
install_name. If CMAKE_SKIP_RPATH is ON then no rpath is generated and
install_name is set to the name of the library. If CMAKE_SKIP_RPATH is
OFF then rpath and install_name both point to the build tree locations.
CMake support for specifying an rpath/install-name is planned but has
not yet been implemented.
If you intend to just distribute a binary for your application then you
can work around this limitation as follows. First build VTK with
VTK_USE_RPATH set to ON. Use a build tree with a really long name.
Then build your application against the VTK build tree. Copy the
libraries to your application tree and use install_name_tool to change
the install_name. There will easily be enough room allocated because of
the long build tree name.
-Brad
More information about the CMake
mailing list