cmake/Help/variable/CMAKE_INSTALL_PREFIX.rst

24 lines
943 B
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
CMAKE_INSTALL_PREFIX
--------------------
2015-11-17 17:22:37 +01:00
Install directory used by :command:`install`.
2014-08-03 19:52:23 +02:00
2015-11-17 17:22:37 +01:00
If ``make install`` is invoked or ``INSTALL`` is built, this directory is
2014-08-03 19:52:23 +02:00
prepended onto all install directories. This variable defaults to
2016-10-30 18:24:19 +01:00
``/usr/local`` on UNIX and ``c:/Program Files/${PROJECT_NAME}`` on Windows.
2016-12-03 23:28:24 +01:00
See :variable:`CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT` for how a
project might choose its own default.
2014-08-03 19:52:23 +02:00
2015-11-17 17:22:37 +01:00
On UNIX one can use the ``DESTDIR`` mechanism in order to relocate the
2018-08-09 18:06:22 +02:00
whole installation. See :envvar:`DESTDIR` for more information.
2014-08-03 19:52:23 +02:00
2015-11-17 17:22:37 +01: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.
2015-04-27 22:25:09 +02:00
.. note::
Use the :module:`GNUInstallDirs` module to provide GNU-style
options for the layout of directories within the installation.