2013-10-15 19:17:36 +04:00
|
|
|
CMAKE_INSTALL_PREFIX
|
|
|
|
--------------------
|
|
|
|
|
2015-08-18 08:34:01 +03:00
|
|
|
Install directory used by :command:`install`.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2015-08-18 08:34:01 +03:00
|
|
|
If ``make install`` is invoked or ``INSTALL`` is built, this directory is
|
2013-10-15 19:17:36 +04:00
|
|
|
prepended onto all install directories. This variable defaults to
|
2016-08-01 22:28:14 +03:00
|
|
|
``/usr/local`` on UNIX and ``c:/Program Files/${PROJECT_NAME}`` on Windows.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2015-08-18 08:34:01 +03:00
|
|
|
On UNIX one can use the ``DESTDIR`` mechanism in order to relocate the
|
|
|
|
whole installation. ``DESTDIR`` means DESTination DIRectory. It is
|
2013-10-15 19:17:36 +04:00
|
|
|
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
|
2015-08-18 08:34:01 +03:00
|
|
|
prefix, e.g. ``/usr/local`` prepended with the ``DESTDIR`` value which
|
|
|
|
finally gives ``/home/john/usr/local``.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2015-08-18 08:34:01 +03:00
|
|
|
WARNING: ``DESTDIR`` may not be used on Windows because installation
|
|
|
|
prefix usually contains a drive letter like in ``C:/Program Files``
|
2013-10-15 19:17:36 +04:00
|
|
|
which cannot be prepended with some other prefix.
|
|
|
|
|
2015-08-18 08:34:01 +03:00
|
|
|
The installation prefix is also added to :variable:`CMAKE_SYSTEM_PREFIX_PATH`
|
|
|
|
so that :command:`find_package`, :command:`find_program`,
|
|
|
|
:command:`find_library`, :command:`find_path`, and :command:`find_file`
|
|
|
|
will search the prefix for other software.
|
2014-11-12 16:32:01 +03:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Use the :module:`GNUInstallDirs` module to provide GNU-style
|
|
|
|
options for the layout of directories within the installation.
|