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

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat Nov 25 14:23:31 EST 2006


On 2006-11-25 18:47+0100 Enrico Scholz wrote:

> "Alan W. Irwin"
> <irwin at beluga.phys.uvic.ca> writes:
>
>>> 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?
>> ...
>> I suggest you drop all mention of DESTDIR within cmake or trying anything
>> special to beat the system.
>
> Sorry, I do not see how this helps for the current problem.

I am pretty sure you already know this, but just to make sure, DESTDIR has a
special meaning for both autotools-related and cmake-related projects.  It's
a temporary staging area used for e.g., rpm and deb generation.  For
autotools, you often have to worry about the DESTDIR details in your
Makefile.am files to make sure "make install DESTDIR=/my/staging/area" works
properly.

In contrast for CMake, my experience is that once you have configured cmake
so that an ordinary "make install" works, then "make install
DESTDIR=/my/staging/area" just works as well without having to worry about
any DESTDIR details from within cmake.

Your post seemed focussed on such DESTDIR details from within cmake.
Instead, I suggest you temporarily forget about DESTDIR functionality and
instead concentrate on the simpler problem of configuring cmake so that the
ordinary "make install" works properly (i.e., empty directory and symlinks
installed in the correct place relative to your install prefix).  Once you
have a good "make install" result with cmake, then I believe "make install
DESTDIR=/my/staging/area" should just work to create a temporary staging
area suitable for rpm and deb building.

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