[Cmake] Install Rules

Ken Martin ken.martin at kitware.com
Fri Jun 1 17:37:03 EDT 2001


Hey Folk,

I have added two new commands to CMake to handle UNIX "make install"
targets. The first command INSTALL_TARGETS is used to install
libraries or executables. The first argument is the relative path
(relative to CMAKE_INSTALL_PREFIX) the other arguments are the targets
to install. For example:

INSTALL_TARGETS(/lib vtkCommon)

The second command, INSTALL_FILES, is designed for installing header
files and the like. It's first argument is the relative path, the
second argument is the extension of the files you want copied, the
remaining arguments are file names, and/or source lists. In the
example below the header files for the VTK classes in vtk/Common are
installed into CMAKE_INSTALL_PREFIX/include/vtk

INSTALL_FILES(/include/vtk .h Common_SRCS)

Currently on windows these commands do nothing, but in the future
maybe we can have them generate a batch file and target that does the
install, or generate an install shield (or wise etc) script.

Ken





More information about the CMake mailing list