CMAKE_INSTALL_PREFIX
Install directory used by install().
if make install
is invoked or INSTALL
is built, this directory is prepended onto(预先加到) all install directories. This variable defaults to /usr/local
on UNIX and c:/Program Files
on Windows.
On UNIX one can use the DESTDIR
mechanism in order to relocate the whole installation. DESTDIR
means DESTination DIRectory. It is commonly used by makefile users in order to install software at non-default location. It is usually invoked like this:
make DESTDIR=/home/john install
which will install the concerned software using the installation prefix, e.g. /usr/local
prepended with the DESTDIR
value which finally gives /home/john/usr/local
.
WARNING: DESTDIR
may not be used on Windows because installation prefix usually contains a drive letter like in C:/Program Files
which cannot be prepended with some other prefix.
install()
This command generates installation rules for a project. Rules specified by calls to this command within a source directory are executed in order during installation.The order across directories is not defined.
There are multiple signatures for this command. Some of them define installation options for files and targets. Options common to multiple signatures are covered here but they are valid only for signatures that specify them. The common options are:
DESTINATION
CMAKE_INSTALL_PREFIX
variable. The prefix can be relocated at install time using the DESTDIR
mechanism explained above.PERMISSIONS
OWNER_READ
, OWNER_WRITE
, OWNER_EXECUTE
, GROUP_READ
, GROUP_WRITE
, GROUP_EXECUTE
, WORLD_READ
, WORLD_WRITE
, WORLD_EXECUTE
, SETUID
, and SETGID
. Permissions that do not make sense on certain platforms are ignored on those platforms.CONFIGURATIONS
COMPONENT
COMPONENT
is not provided a default component “Unspecified” is created. The default component name may be controlled with the CMAKE_INSTALL_DEFAULT_COMPONENT_NAME
variable.RENAME
原文:https://www.cnblogs.com/liuzhenbo/p/11185432.html