diff options
Diffstat (limited to 'Help/variable/CMAKE_INSTALL_PREFIX.rst')
-rw-r--r-- | Help/variable/CMAKE_INSTALL_PREFIX.rst | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_INSTALL_PREFIX.rst b/Help/variable/CMAKE_INSTALL_PREFIX.rst new file mode 100644 index 0000000..72c8d41 --- /dev/null +++ b/Help/variable/CMAKE_INSTALL_PREFIX.rst @@ -0,0 +1,29 @@ +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. + +The installation prefix is also added to CMAKE_SYSTEM_PREFIX_PATH so +that find_package, find_program, find_library, find_path, and +find_file will search the prefix for other software. |