[CMake] Howto create an empty directory during 'make install'?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat Nov 25 12:22:11 EST 2006


Enrico said:
> how can I create an empty directory during 'make install'? With ordinary
> make I would write:
> 
> | install-data-local:
> |       mkdir -p ${DESTDIR}${mydir}
> 
> 
> How can I do this with cmake?
> 
> Ditto, how can I create symlinks like
> 
> | ${DESTDIR}${bindir}/foo -> foo-1
> 
> 
> I tried things like
> 
> | INSTALL(CODE "EXECUTE_PROCESS(COMMAND mkdir -p ${DESTDIR}${mydir})")
> 
> but '${DESTDIR}' was not expanded by 'make install DESTDIR=/tmp/foo' and
> cmake tried to make the directory in the top filesystem.

I suggest you drop all mention of DESTDIR within cmake or trying anything
special to beat the system.  Instead work on getting a normal install to
work properly. My experience with cmake is that once the normal "make
install" works properly, then

make install DESTDIR='/temporary/staging/area'

works fine as well.

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