Imported Upstream version 2.8.12.2
[platform/upstream/cmake.git] / Source / CPack / cmCPackDocumentVariables.cxx
1 #include "cmCPackDocumentVariables.h"
2 #include "cmake.h"
3
4 void cmCPackDocumentVariables::DefineVariables(cmake* cm)
5 {
6   // Subsection: variables defined/used by cpack,
7   // which are common to all CPack generators
8
9   cm->DefineProperty
10       ("CPACK_PACKAGING_INSTALL_PREFIX", cmProperty::VARIABLE,
11        "The prefix used in the built package.",
12        "Each CPack generator has a default value (like /usr)."
13        " This default value may"
14        " be overwritten from the CMakeLists.txt or the cpack command line"
15        " by setting an alternative value.\n"
16        "e.g. "
17        " set(CPACK_PACKAGING_INSTALL_PREFIX \"/opt\")\n"
18        "This is not the same purpose as CMAKE_INSTALL_PREFIX which"
19        " is used when installing from the build tree without building"
20        " a package."
21        "", false,
22        "Variables common to all CPack generators");
23
24   cm->DefineProperty
25         ("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", cmProperty::VARIABLE,
26          "Boolean toggle to include/exclude top level directory.",
27          "When preparing a package CPack installs the item under"
28          " the so-called top level directory. The purpose of"
29          " is to include (set to 1 or ON or TRUE) the top level directory"
30          " in the package or not (set to 0 or OFF or FALSE).\n"
31          "Each CPack generator has a built-in default value for this"
32          " variable. E.g. Archive generators (ZIP, TGZ, ...) includes"
33          " the top level whereas RPM or DEB don't. The user may override"
34          " the default value by setting this variable.\n"
35          "There is a similar variable "
36          "CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY "
37          "which may be used to override the behavior for the component"
38          " packaging case which may have different default value for"
39          " historical (now backward compatibility) reason.", false,
40          "Variables common to all CPack generators");
41
42   cm->DefineProperty
43           ("CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY", cmProperty::VARIABLE,
44             "Boolean toggle to include/exclude top level directory "
45              "(component case).",
46             "Similar usage as CPACK_INCLUDE_TOPLEVEL_DIRECTORY"
47             " but for the component case. "
48             "See CPACK_INCLUDE_TOPLEVEL_DIRECTORY documentation for"
49             " the detail.", false,
50             "Variables common to all CPack generators");
51
52   cm->DefineProperty
53           ("CPACK_SET_DESTDIR", cmProperty::VARIABLE,
54            "Boolean toggle to make CPack use DESTDIR mechanism when"
55            " packaging.", "DESTDIR means DESTination DIRectory."
56            " It is commonly used by makefile "
57            "users in order to install software at non-default location. It "
58            "is a basic relocation mechanism that should not be used on"
59            " Windows (see CMAKE_INSTALL_PREFIX documentation). "
60            "It is usually invoked like this:\n"
61            " make DESTDIR=/home/john install\n"
62            "which will install the concerned software using the"
63            " installation prefix, e.g. \"/usr/local\" prepended with "
64            "the DESTDIR value which finally gives \"/home/john/usr/local\"."
65            " When preparing a package, CPack first installs the items to be "
66            "packaged in a local (to the build tree) directory by using the "
67            "same DESTDIR mechanism. Nevertheless, if "
68            "CPACK_SET_DESTDIR is set then CPack will set DESTDIR before"
69            " doing the local install. The most noticeable difference is"
70            " that without CPACK_SET_DESTDIR, CPack uses "
71            "CPACK_PACKAGING_INSTALL_PREFIX as a prefix whereas with "
72            "CPACK_SET_DESTDIR set, CPack will use CMAKE_INSTALL_PREFIX as"
73            " a prefix.\n"
74            "Manually setting CPACK_SET_DESTDIR may help (or simply be"
75            " necessary) if some install rules uses absolute "
76            "DESTINATION (see CMake INSTALL command)."
77            " However, starting with"
78            " CPack/CMake 2.8.3 RPM and DEB installers tries to handle DESTDIR"
79            " automatically so that it is seldom necessary for the user to set"
80            " it.", false,
81            "Variables common to all CPack generators");
82
83   cm->DefineProperty
84         ("CPACK_INSTALL_SCRIPT", cmProperty::VARIABLE,
85          "Extra CMake script provided by the user.",
86          "If set this CMake script will be executed by CPack "
87          "during its local [CPack-private] installation "
88          "which is done right before packaging the files."
89          " The script is not called by e.g.: make install.", false,
90          "Variables common to all CPack generators");
91
92   cm->DefineProperty
93         ("CPACK_ABSOLUTE_DESTINATION_FILES", cmProperty::VARIABLE,
94          "List of files which have been installed using "
95          " an ABSOLUTE DESTINATION path.",
96          "This variable is a Read-Only variable which is set internally"
97          " by CPack during installation and before packaging using"
98          " CMAKE_ABSOLUTE_DESTINATION_FILES defined in cmake_install.cmake "
99          "scripts. The value can be used within CPack project configuration"
100          " file and/or CPack<GEN>.cmake file of <GEN> generator.", false,
101          "Variables common to all CPack generators");
102
103   cm->DefineProperty
104         ("CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
105          "Ask CPack to warn each time a file with absolute INSTALL"
106          " DESTINATION is encountered.",
107          "This variable triggers the definition of "
108          "CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs"
109          " cmake_install.cmake scripts.", false,
110          "Variables common to all CPack generators");
111
112   cm->DefineProperty
113         ("CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
114          "Ask CPack to error out as soon as a file with absolute INSTALL"
115          " DESTINATION is encountered.",
116          "The fatal error is emitted before the installation of "
117          "the offending file takes place. Some CPack generators, like NSIS,"
118          "enforce this internally. "
119          "This variable triggers the definition of"
120          "CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs"
121          "Variables common to all CPack generators");
122 }