[Cmake] CMaking Unix Makefiles... install target

William A. Hoffman bill.hoffman at kitware.com
Sun Dec 9 22:24:38 EST 2001


OK, so make install works fine, if you are using it to install cmake on the 
machine
you are on.  However, you would like to be able to configure cmake to run 
from say /usr/local,
but the make install step puts all the files in $DESTDIR instead which makes
creating rpms or tar balls easier.

That will not make it into 1.0.



However, you could fake it out with a chroot command.

  ./configure --prefix=/usr
  make
  chroot /tmp/cmakeinstall  make install

-Bill

At 04:34 PM 12/9/2001 -0500, Maitland Bottoms wrote:
>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
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake




More information about the CMake mailing list