[CMake] RPATH questions

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat Jul 22 18:46:00 EDT 2006


I build modules with cmake which depend on external libraries which may be
installed in non-standard locations.  The modules also depend on cmake
targets.  These modules are checked at build time with a small application
that dynamically loads them. These modules are also installed (possibly
using a non-standard install prefix). Thus, the build-tree version and
installed version of the modules need different rpaths.  For the build-tree
version I want to set an RPATH to access the directories of external
libraries and the build-tree targets. For the installed version I want to
set an RPATH to access the directories of the external libraries and the
install-tree targets.

If I simply specify the cmake targets and the fullpathname of the external
libraries which the module depends on using TARGET_LINK_LIBRARIES will CMake
automatically do what I want with RPATH?  Or do I have to use some
combinations of the RPATH-related properties specified in the man page for
SET_TARGET_PROPERTIES.  Or some combination of the two approaches?

Any help to point me in the right direction would be appreciated.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list