File: CPACK_SET_DESTDIR.rst

package info (click to toggle)
cmake 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 44,040 kB
  • sloc: cpp: 160,392; ansic: 149,082; yacc: 3,254; sh: 2,825; xml: 2,427; lex: 1,234; python: 449; lisp: 267; objc: 134; f90: 105; fortran: 101; perl: 99; makefile: 71; tcl: 55; asm: 28; php: 25; ruby: 22; java: 20
file content (30 lines) | stat: -rw-r--r-- 1,355 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
CPACK_SET_DESTDIR
-----------------

Boolean toggle to make CPack use DESTDIR mechanism when packaging.

DESTDIR means DESTination DIRectory.  It is commonly used by makefile
users in order to install software at non-default location.  It is a
basic relocation mechanism that should not be used on Windows (see
CMAKE_INSTALL_PREFIX documentation).  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".  When preparing a package, CPack
first installs the items to be packaged in a local (to the build tree)
directory by using the same DESTDIR mechanism.  Nevertheless, if
CPACK_SET_DESTDIR is set then CPack will set DESTDIR before doing the
local install.  The most noticeable difference is that without
CPACK_SET_DESTDIR, CPack uses CPACK_PACKAGING_INSTALL_PREFIX as a
prefix whereas with CPACK_SET_DESTDIR set, CPack will use
CMAKE_INSTALL_PREFIX as a prefix.

Manually setting CPACK_SET_DESTDIR may help (or simply be necessary)
if some install rules uses absolute DESTINATION (see CMake INSTALL
command).  However, starting with CPack/CMake 2.8.3 RPM and DEB
installers tries to handle DESTDIR automatically so that it is seldom
necessary for the user to set it.