CMAKE_INSTALL_PREFIX.rst 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. CMAKE_INSTALL_PREFIX
  2. --------------------
  3. Install directory used by install.
  4. If "make install" is invoked or INSTALL is built, this directory is
  5. prepended onto all install directories. This variable defaults to
  6. /usr/local on UNIX and c:/Program Files on Windows.
  7. On UNIX one can use the DESTDIR mechanism in order to relocate the
  8. whole installation. DESTDIR means DESTination DIRectory. It is
  9. commonly used by makefile users in order to install software at
  10. non-default location. It is usually invoked like this:
  11. ::
  12. make DESTDIR=/home/john install
  13. which will install the concerned software using the installation
  14. prefix, e.g. "/usr/local" prepended with the DESTDIR value which
  15. finally gives "/home/john/usr/local".
  16. WARNING: DESTDIR may not be used on Windows because installation
  17. prefix usually contains a drive letter like in "C:/Program Files"
  18. which cannot be prepended with some other prefix.
  19. The installation prefix is also added to CMAKE_SYSTEM_PREFIX_PATH so
  20. that find_package, find_program, find_library, find_path, and
  21. find_file will search the prefix for other software.
  22. .. note::
  23. Use the :module:`GNUInstallDirs` module to provide GNU-style
  24. options for the layout of directories within the installation.