4 Install directory used by :command:`install`.
6 If ``make install`` is invoked or ``INSTALL`` is built, this directory is
7 prepended onto all install directories. This variable defaults to
8 ``/usr/local`` on UNIX and ``c:/Program Files/${PROJECT_NAME}`` on Windows.
9 See :variable:`CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT` for how a
10 project might choose its own default.
12 On UNIX one can use the ``DESTDIR`` mechanism in order to relocate the
13 whole installation to a staging area. See the :envvar:`DESTDIR` environment
14 variable for more information.
16 The installation prefix is also added to :variable:`CMAKE_SYSTEM_PREFIX_PATH`
17 so that :command:`find_package`, :command:`find_program`,
18 :command:`find_library`, :command:`find_path`, and :command:`find_file`
19 will search the prefix for other software. This behavior can be disabled by
20 setting the :variable:`CMAKE_FIND_NO_INSTALL_PREFIX` to ``TRUE`` before the
21 first :command:`project` invocation.
25 Use the :module:`GNUInstallDirs` module to provide GNU-style
26 options for the layout of directories within the installation.
28 The ``CMAKE_INSTALL_PREFIX`` may be defined when configuring a build tree
29 to set its installation prefix. Or, when using the :manual:`cmake(1)`
30 command-line tool's ``--install`` mode, one may specify a different prefix
31 using the ``--prefix`` option:
35 cmake --install . --prefix /my/install/prefix