[CMake] Symbolinc links

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Aug 21 11:01:06 EDT 2008


On 2008-08-21 16:26+0200 William Candillon wrote:

> Hi,
>
> During the installation of my cmake project on unix systems, I would
> like to create a symbolic of my binary in /usr/bin.
> Is it possible to execute the ln command only during the execution of
> the install target ?

Use either the INSTALL(CODE... or INSTALL(SCRIPT... signatures.  Either of
those allows you to execute arbitrary CMake code (and thus do essentially
anything you like) at install time.

Once you get ln to work, I would change that to the cmake -E create_symlink
command for best cross-platform results.

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 libLASi project (unifont.org/lasi); 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