[Cmake] CMaking Unix Makefiles... install target

Maitland Bottoms bottoms at debian . org
Sun, 9 Dec 2001 16:34:44 -0500


William A. Hoffman writes:
 > The way to change the install directory with cmake is to change the prefix.
 > This can be done in two ways:
 > 
 > 1. when bootstrapping cmake:
 > configure --prefix=/your/directory
 > 
 > 2. if building cmake with cmake, then change the INSTALL_PREFIX in the 
 > CMakeCache.txt file.
 > 
There isn't an INSTALL_PREFIX - there is a CMAKE_INSTALL_PREFIX which
didn't seem to do anything, and CMAKE_CONFIGURE_INSTALL_PREFIX which
did not work in the same way that configure --prefix didn't work.

The problem is that /you/directory/bin/cmake gets explicitly used by
CMakeSetup, but that path does not exist on systems which get an
installed package.

For building Debian .deb packages or Red Hat .rpm packages it would be
nice to do the following:

(From an example which builds a Red Hat .rpm package)
      ./configure --prefix=/usr
      make
      make install DESTDIR=$RPM_BUILD_ROOT



Quoting http://www . jtcsv . com/cgibin/icu-bugs?findid=314
<quoted text>
It is common to configure a package for installation somewhere, but to
actually install it in some temporary location prior to packaging and
installation. In the autoconf world, this is done by passing DESTDIR
at installation time, as in:

    % make install DESTDIR=/tmp/here

ICU should support that, because not doing so doesn't help to
integrate ICU in a release environment that depends on this idiom. It
is also the only way one can currently package ICU today when building
it on a NFS exported fs, and trying to install as root on a local
machine, since gencol tries to change files at installation time
(which fails, root being mapped to nobody over NFS, generally).
</quoted text>

It would be nice if CMake had this capability. Otherwise package
maintainers would have to re-write all of the install steps.

I hope that helps,
 -Maitland