1CPACK(1)                             CMake                            CPACK(1)
2
3
4

NAME

6       cpack - CPack Command-Line Reference
7

SYNOPSIS

9          cpack [<options>]
10

DESCRIPTION

12       The  cpack executable is the CMake packaging program.  It generates in‐
13       stallers and source packages in a variety of formats.
14
15       For each installer or package format, cpack  has  a  specific  backend,
16       called  "generator".  A generator is responsible for generating the re‐
17       quired inputs and invoking the specific package creation  tools.  These
18       installer  or  package generators are not to be confused with the make‐
19       file generators of the cmake command.
20
21       All supported generators are specified in the cpack-generators  manual.
22       The  command cpack --help prints a list of generators supported for the
23       target platform.  Which of them are to be used can be selected  through
24       the CPACK_GENERATOR variable or through the command-line option -G.
25
26       The  cpack  program  is  steered by a configuration file written in the
27       CMake language. Unless chosen differently through the command-line  op‐
28       tion  --config,  the file CPackConfig.cmake in the current directory is
29       used.
30
31       In the standard CMake workflow, the file CPackConfig.cmake is generated
32       by  the  cmake executable, provided the CPack module is included by the
33       project's CMakeLists.txt file.
34

OPTIONS

36       -G <generators>
37              <generators> is a semicolon-separated list of  generator  names.
38              cpack  will  iterate through this list and produce package(s) in
39              that generator's format according to the details provided in the
40              CPackConfig.cmake  configuration  file.   If  this option is not
41              given, the CPACK_GENERATOR variable determines the  default  set
42              of generators that will be used.
43
44       -C <configs>
45              Specify the project configuration(s) to be packaged (e.g. Debug,
46              Release, etc.), where <configs> is a  semicolon-separated  list.
47              When the CMake project uses a multi-configuration generator such
48              as Xcode or Visual Studio, this option is needed to  tell  cpack
49              which  built executables to include in the package.  The user is
50              responsible for ensuring that the configuration(s)  listed  have
51              already been built before invoking cpack.
52
53       -D <var>=<value>
54              Set  a  CPack  variable.   This  will override any value set for
55              <var> in the input file read by cpack.
56
57       --config <configFile>
58              Specify the configuration file read  by  cpack  to  provide  the
59              packaging details.  By default, CPackConfig.cmake in the current
60              directory will be used.
61
62       -V, --verbose
63              Run cpack with verbose output.  This can be used  to  show  more
64              details  from  the  package generation tools and is suitable for
65              project developers.
66
67       --debug
68              Run cpack with debug output.  This option is intended mainly for
69              the  developers  of  cpack  itself and is not normally needed by
70              project developers.
71
72       --trace
73              Put the underlying cmake scripts in trace mode.
74
75       --trace-expand
76              Put the underlying cmake scripts in expanded trace mode.
77
78       -P <packageName>
79              Override/define the value  of  the  CPACK_PACKAGE_NAME  variable
80              used  for  packaging.   Any  value  set for this variable in the
81              CPackConfig.cmake file will then be ignored.
82
83       -R <packageVersion>
84              Override/define the value of the CPACK_PACKAGE_VERSION  variable
85              used  for packaging.  It will override a value set in the CPack‐
86              Config.cmake   file   or   one   automatically   computed   from
87              CPACK_PACKAGE_VERSION_MAJOR,   CPACK_PACKAGE_VERSION_MINOR   and
88              CPACK_PACKAGE_VERSION_PATCH.
89
90       -B <packageDirectory>
91              Override/define CPACK_PACKAGE_DIRECTORY, which controls the  di‐
92              rectory where CPack will perform its packaging work.  The resul‐
93              tant package(s) will be created at this location by default  and
94              a  _CPack_Packages  subdirectory will also be created below this
95              directory to use as a working area during package creation.
96
97       --vendor <vendorName>
98              Override/define CPACK_PACKAGE_VENDOR.
99
100       --preset <presetName>
101              Use a preset from cmake-presets(7).
102
103       --list-presets
104              List presets from cmake-presets(7).
105
106       -version [<file>], --version [<file>], /V [<file>]
107              Show program  name/version  banner  and  exit.   The  output  is
108              printed to a named <file> if given.
109
110       -h, -H, --help, -help, -usage, /?
111              Print usage information and exit.
112
113              Usage  describes  the  basic  command line interface and its op‐
114              tions.
115
116       --help-full [<file>]
117              Print all help manuals and exit.
118
119              All manuals are printed in a human-readable  text  format.   The
120              output is printed to a named <file> if given.
121
122       --help-manual <man> [<file>]
123              Print one help manual and exit.
124
125              The specified manual is printed in a human-readable text format.
126              The output is printed to a named <file> if given.
127
128       --help-manual-list [<file>]
129              List help manuals available and exit.
130
131              The list contains all manuals for which help may be obtained  by
132              using  the  --help-manual option followed by a manual name.  The
133              output is printed to a named <file> if given.
134
135       --help-command <cmd> [<file>]
136              Print help for one command and exit.
137
138              The cmake-commands(7) manual entry for <cmd> is printed in a hu‐
139              man-readable  text  format.   The  output  is printed to a named
140              <file> if given.
141
142       --help-command-list [<file>]
143              List commands with help available and exit.
144
145              The list contains all commands for which help may be obtained by
146              using the --help-command option followed by a command name.  The
147              output is printed to a named <file> if given.
148
149       --help-commands [<file>]
150              Print cmake-commands manual and exit.
151
152              The cmake-commands(7) manual is printed in a human-readable text
153              format.  The output is printed to a named <file> if given.
154
155       --help-module <mod> [<file>]
156              Print help for one module and exit.
157
158              The  cmake-modules(7) manual entry for <mod> is printed in a hu‐
159              man-readable text format.  The output  is  printed  to  a  named
160              <file> if given.
161
162       --help-module-list [<file>]
163              List modules with help available and exit.
164
165              The  list contains all modules for which help may be obtained by
166              using the --help-module option followed by a module  name.   The
167              output is printed to a named <file> if given.
168
169       --help-modules [<file>]
170              Print cmake-modules manual and exit.
171
172              The  cmake-modules(7) manual is printed in a human-readable text
173              format.  The output is printed to a named <file> if given.
174
175       --help-policy <cmp> [<file>]
176              Print help for one policy and exit.
177
178              The cmake-policies(7) manual entry for <cmp> is printed in a hu‐
179              man-readable  text  format.   The  output  is printed to a named
180              <file> if given.
181
182       --help-policy-list [<file>]
183              List policies with help available and exit.
184
185              The list contains all policies for which help may be obtained by
186              using  the  --help-policy option followed by a policy name.  The
187              output is printed to a named <file> if given.
188
189       --help-policies [<file>]
190              Print cmake-policies manual and exit.
191
192              The cmake-policies(7) manual is printed in a human-readable text
193              format.  The output is printed to a named <file> if given.
194
195       --help-property <prop> [<file>]
196              Print help for one property and exit.
197
198              The cmake-properties(7) manual entries for <prop> are printed in
199              a human-readable text format.  The output is printed to a  named
200              <file> if given.
201
202       --help-property-list [<file>]
203              List properties with help available and exit.
204
205              The  list contains all properties for which help may be obtained
206              by using the --help-property option followed by a property name.
207              The output is printed to a named <file> if given.
208
209       --help-properties [<file>]
210              Print cmake-properties manual and exit.
211
212              The  cmake-properties(7)  manual  is printed in a human-readable
213              text format.  The output is printed to a named <file> if given.
214
215       --help-variable <var> [<file>]
216              Print help for one variable and exit.
217
218              The cmake-variables(7) manual entry for <var> is  printed  in  a
219              human-readable  text  format.   The output is printed to a named
220              <file> if given.
221
222       --help-variable-list [<file>]
223              List variables with help available and exit.
224
225              The list contains all variables for which help may  be  obtained
226              by using the --help-variable option followed by a variable name.
227              The output is printed to a named <file> if given.
228
229       --help-variables [<file>]
230              Print cmake-variables manual and exit.
231
232              The cmake-variables(7) manual is  printed  in  a  human-readable
233              text format.  The output is printed to a named <file> if given.
234

SEE ALSO

236       The following resources are available to get help using CMake:
237
238       Home Page
239              https://cmake.org
240
241              The primary starting point for learning about CMake.
242
243       Online Documentation and Community Resources
244              https://cmake.org/documentation
245
246              Links  to available documentation and community resources may be
247              found on this web page.
248
249       Discourse Forum
250              https://discourse.cmake.org
251
252              The Discourse Forum hosts discussion and questions about CMake.
253
255       2000-2023 Kitware, Inc. and Contributors
256
257
258
259
2603.27.7                           Oct 07, 2023                         CPACK(1)
Impressum