1CPACK-GENERATORS(7)                  CMake                 CPACK-GENERATORS(7)
2
3
4

NAME

6       cpack-generators - CPack Generator Reference
7

GENERATORS

9   CPack Archive Generator
10       CPack generator for packaging files into an archive, which can have any
11       of the following formats:
12
13          • 7Z - 7zip - (.7z)
14
15          • TBZ2 (.tar.bz2)
16
17          • TGZ (.tar.gz)
18
19          • TXZ (.tar.xz)
20
21          • TZ (.tar.Z)
22
23          • TZST (.tar.zst)
24
25          • ZIP (.zip)
26
27       New in version 3.1: 7Z and TXZ formats support.
28
29
30       New in version 3.16: TZST format support.
31
32
33       When this generator is called from CPackSourceConfig.cmake (or  through
34       the package_source target), then the generated archive will contain all
35       files  in  the   project   directory,   except   those   specified   in
36       CPACK_SOURCE_IGNORE_FILES.   The  following is one example of packaging
37       all source files of a project:
38
39          set(CPACK_SOURCE_GENERATOR "TGZ")
40          set(CPACK_SOURCE_IGNORE_FILES
41            \\.git/
42            build/
43            ".*~$"
44          )
45          set(CPACK_VERBATIM_VARIABLES YES)
46          include(CPack)
47
48       When this generator is called from CPackConfig.cmake  (or  through  the
49       package target), then the generated archive will contain all files that
50       have been installed via CMake's install() command (and  the  deprecated
51       commands install_files(), install_programs(), and install_targets()).
52
53   Variables specific to CPack Archive generator
54       CPACK_ARCHIVE_FILE_NAME
55
56       CPACK_ARCHIVE_<component>_FILE_NAME
57              Package file name without extension. The extension is determined
58              from the archive format (see list above) and  automatically  ap‐
59              pended   to   the   file  name.   The  default  is  <CPACK_PACK‐
60              AGE_FILE_NAME>[-<component>], with spaces replaced by '-'.
61
62              New  in   version   3.9:   Per-component   CPACK_ARCHIVE_<compo‐
63              nent>_FILE_NAME variables.
64
65
66       CPACK_ARCHIVE_COMPONENT_INSTALL
67              Enable  component  packaging.  If enabled (ON), then the archive
68              generator creates  multiple packages. The default is OFF,  which
69              means  that  a single package containing files of all components
70              is generated.
71
72   Variables used by CPack Archive generator
73       These variables are used by the Archive generator, but are also  avail‐
74       able  to CPack generators which are essentially archives at their core.
75       These include:
76
77CPack Cygwin Generator
78
79CPack FreeBSD Generator
80
81       CPACK_ARCHIVE_THREADS
82              New in version 3.18.
83
84
85              The number of threads to use when performing the compression. If
86              set  to  0, the number of available cores on the machine will be
87              used instead.  The default is 1 which limits  compression  to  a
88              single  thread.  Note  that  not  all  compression modes support
89              threading in all environments. Currently, only the  XZ  compres‐
90              sion may support it.
91
92              See also the CPACK_THREADS variable.
93
94       NOTE:
95          Official  CMake  binaries available on cmake.org ship with a liblzma
96          that does not support parallel compression.
97
98   CPack Bundle Generator
99       CPack Bundle generator (macOS) specific options
100
101   Variables specific to CPack Bundle generator
102       Installers built on macOS using the Bundle generator use the  aforemen‐
103       tioned  DragNDrop  (CPACK_DMG_xxx)  variables,  plus the following Bun‐
104       dle-specific parameters (CPACK_BUNDLE_xxx).
105
106       CPACK_BUNDLE_NAME
107              The name of the generated bundle.  This  appears  in  the  macOS
108              Finder as the bundle name. Required.
109
110       CPACK_BUNDLE_PLIST
111              Path  to  an macOS Property List (.plist) file that will be used
112              for the generated bundle. This assumes that the caller has  gen‐
113              erated or specified their own Info.plist file. Required.
114
115       CPACK_BUNDLE_ICON
116              Path to an macOS icon file that will be used as the icon for the
117              generated bundle. This is the icon that  appears  in  the  macOS
118              Finder  for the bundle, and in the macOS dock when the bundle is
119              opened. Required.
120
121       CPACK_BUNDLE_STARTUP_COMMAND
122              Path to a startup script. This is a path  to  an  executable  or
123              script  that  will be run whenever an end-user double-clicks the
124              generated bundle in the macOS Finder. Optional.
125
126       CPACK_BUNDLE_APPLE_CERT_APP
127              New in version 3.2.
128
129
130              The name of your Apple supplied code signing certificate for the
131              application.   The  name usually takes the form Developer ID Ap‐
132              plication:  [Name]  or  3rd  Party  Mac  Developer  Application:
133              [Name].  If this variable is not set the application will not be
134              signed.
135
136       CPACK_BUNDLE_APPLE_ENTITLEMENTS
137              New in version 3.2.
138
139
140              The name of the Property List (.plist) file that  contains  your
141              Apple entitlements for sandboxing your application. This file is
142              required for submission to the macOS App Store.
143
144       CPACK_BUNDLE_APPLE_CODESIGN_FILES
145              New in version 3.2.
146
147
148              A list of additional files that you wish to be  signed.  You  do
149              not  need  to list the main application folder, or the main exe‐
150              cutable. You should list any frameworks and plugins that are in‐
151              cluded in your app bundle.
152
153       CPACK_BUNDLE_APPLE_CODESIGN_PARAMETER
154              New in version 3.3.
155
156
157              Additional  parameter  that  will  passed  to codesign.  Default
158              value: --deep -f
159
160       CPACK_COMMAND_CODESIGN
161              New in version 3.2.
162
163
164              Path to the codesign(1) command used to sign  applications  with
165              an  Apple  cert. This variable can be used to override the auto‐
166              matically detected command  (or  specify  its  location  if  the
167              auto-detection fails to find it).
168
169   CPack Cygwin Generator
170       Cygwin CPack generator (Cygwin).
171
172   Variables affecting the CPack Cygwin generator
173       • New in version 3.18: CPACK_ARCHIVE_THREADS
174
175
176   Variables specific to CPack Cygwin generator
177       The  following  variable  is specific to installers build on and/or for
178       Cygwin:
179
180       CPACK_CYGWIN_PATCH_NUMBER
181              The Cygwin patch number.  FIXME: This  documentation  is  incom‐
182              plete.
183
184       CPACK_CYGWIN_PATCH_FILE
185              The Cygwin patch file.  FIXME: This documentation is incomplete.
186
187       CPACK_CYGWIN_BUILD_SCRIPT
188              The  Cygwin  build  script.  FIXME: This documentation is incom‐
189              plete.
190
191   CPack DEB Generator
192       The built in (binary) CPack DEB generator (Unix only)
193
194   Variables specific to CPack Debian (DEB) generator
195       The CPack DEB generator may be used to create DEB package using  CPack.
196       The CPack DEB generator is a CPack generator thus it uses the CPACK_XXX
197       variables used by CPack.
198
199       The CPack DEB generator should work on any Linux host but it will  pro‐
200       duce  better deb package when Debian specific tools dpkg-xxx are usable
201       on the build system.
202
203       The CPack DEB generator has specific features which are  controlled  by
204       the specifics CPACK_DEBIAN_XXX variables.
205
206       CPACK_DEBIAN_<COMPONENT>_XXXX  variables  may  be used in order to have
207       component specific values.  Note however that <COMPONENT> refers to the
208       grouping  name written in upper case. It may be either a component name
209       or a component GROUP name.
210
211       Here are some CPack DEB generator wiki resources that are here for his‐
212       toric reasons and are no longer maintained but may still prove useful:
213
214https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/Configuration
215
216https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/PackageGenerators#deb-unix-only
217
218       List of CPack DEB generator specific variables:
219
220       CPACK_DEB_COMPONENT_INSTALL
221              Enable component packaging for CPackDEB
222
223              • Mandatory : NO
224
225              • Default   : OFF
226
227              If  enabled  (ON)  multiple packages are generated. By default a
228              single package containing files of all components is generated.
229
230       CPACK_DEBIAN_PACKAGE_NAME
231
232       CPACK_DEBIAN_<COMPONENT>_PACKAGE_NAME
233              Set Package control field (variable is automatically transformed
234              to lower case).
235
236              • Mandatory : YES
237
238              • Default   :
239
240CPACK_PACKAGE_NAME for non-component based installations
241
242CPACK_DEBIAN_PACKAGE_NAME  suffixed  with  -<COMPONENT>  for
243                  component-based installations.
244
245              New in version 3.5: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
246              AGE_NAME variables.
247
248
249              See
250              https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source
251
252       CPACK_DEBIAN_FILE_NAME
253
254       CPACK_DEBIAN_<COMPONENT>_FILE_NAME
255              New in version 3.6.
256
257
258              Package file name.
259
260              • Mandatory : YES
261
262              • Default   : <CPACK_PACKAGE_FILE_NAME>[-<component>].deb
263
264              This  may be set to DEB-DEFAULT to allow the CPack DEB generator
265              to generate package file name by itself in deb format:
266
267                 <PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb
268
269              Alternatively provided package file name must  end  with  either
270              .deb or .ipk suffix.
271
272              New in version 3.10: .ipk suffix used by OPKG packaging system.
273
274
275              NOTE:
276                 Preferred  setting  of  this  variable is DEB-DEFAULT but for
277                 backward compatibility with the CPack DEB generator in  CMake
278                 prior to version 3.6 this feature is disabled by default.
279
280              NOTE:
281                 By using non default filenames duplicate names may occur. Du‐
282                 plicate files get overwritten and it is up to the packager to
283                 set the variables in a manner that will prevent such errors.
284
285       CPACK_DEBIAN_PACKAGE_EPOCH
286              New in version 3.10.
287
288
289              The Debian package epoch
290
291              • Mandatory : No
292
293              • Default   : -
294
295              Optional  number  that  should be incremented when changing ver‐
296              sioning schemas or fixing mistakes in  the  version  numbers  of
297              older packages.
298
299       CPACK_DEBIAN_PACKAGE_VERSION
300              The Debian package version
301
302              • Mandatory : YES
303
304              • Default   : CPACK_PACKAGE_VERSION
305
306              This variable may contain only alphanumerics (A-Za-z0-9) and the
307              characters . + - ~ (full stop, plus, hyphen, tilde)  and  should
308              start  with  a digit. If CPACK_DEBIAN_PACKAGE_RELEASE is not set
309              then hyphens are not allowed.
310
311              NOTE:
312                 For backward compatibility with CMake 3.9 and lower a  failed
313                 test of this variable's content is not a hard error when both
314                 CPACK_DEBIAN_PACKAGE_RELEASE  and  CPACK_DEBIAN_PACKAGE_EPOCH
315                 variables are not set. An author warning is reported instead.
316
317       CPACK_DEBIAN_PACKAGE_RELEASE
318              New in version 3.6.
319
320
321              The Debian package release - Debian revision number.
322
323              • Mandatory : No
324
325              • Default   : -
326
327              This  is  the numbering of the DEB package itself, i.e. the ver‐
328              sion of the packaging and not the version of  the  content  (see
329              CPACK_DEBIAN_PACKAGE_VERSION).  One may change the default value
330              if the previous packaging was buggy and/or you want to put  here
331              a fancy Linux distro specific numbering.
332
333       CPACK_DEBIAN_PACKAGE_ARCHITECTURE
334
335       CPACK_DEBIAN_<COMPONENT>_PACKAGE_ARCHITECTURE
336              The Debian package architecture
337
338              • Mandatory : YES
339
340              • Default    :  Output  of dpkg --print-architecture (or i386 if
341                dpkg is not found)
342
343              New in version 3.6: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
344              AGE_ARCHITECTURE variables.
345
346
347       CPACK_DEBIAN_PACKAGE_DEPENDS
348
349       CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS
350              Sets the Debian dependencies of this package.
351
352              • Mandatory : NO
353
354              • Default   :
355
356                • An empty string for non-component based installations
357
358CPACK_DEBIAN_PACKAGE_DEPENDS  for  component-based installa‐
359                  tions.
360
361              New in version 3.3: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
362              AGE_DEPENDS variables.
363
364
365              NOTE:
366                 If   CPACK_DEBIAN_PACKAGE_SHLIBDEPS   or   more  specifically
367                 CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS is  set  for  this
368                 component,  the  discovered  dependencies will be appended to
369                 CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS      instead      of
370                 CPACK_DEBIAN_PACKAGE_DEPENDS.                              If
371                 CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS is an empty  string,
372                 only  the  automatically  discovered dependencies will be set
373                 for this component.
374
375              Example:
376
377                 set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libc6 (< 2.4)")
378
379       CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS
380              New in version 3.6.
381
382
383              Sets inter-component dependencies if  listed  with  CPACK_COMPO‐
384              NENT_<compName>_DEPENDS variables.
385
386              • Mandatory : NO
387
388              • Default   : -
389
390       CPACK_DEBIAN_PACKAGE_MAINTAINER
391              The Debian package maintainer
392
393              • Mandatory : YES
394
395              • Default   : CPACK_PACKAGE_CONTACT
396
397       CPACK_DEBIAN_PACKAGE_DESCRIPTION
398
399       CPACK_DEBIAN_<COMPONENT>_DESCRIPTION
400              The Debian package description
401
402              • Mandatory : YES
403
404              • Default   :
405
406CPACK_DEBIAN_<COMPONENT>_DESCRIPTION  (component  based  in‐
407                  stallers only) if set,  or  CPACK_DEBIAN_PACKAGE_DESCRIPTION
408                  if set, or
409
410CPACK_COMPONENT_<compName>_DESCRIPTION  (component based in‐
411                  stallers only) if set, or CPACK_PACKAGE_DESCRIPTION if  set,
412                  or
413
414                • content  of  the  file  specified  in CPACK_PACKAGE_DESCRIP‐
415                  TION_FILE if set
416
417              If after that description  is  not  set,  CPACK_PACKAGE_DESCRIP‐
418              TION_SUMMARY  going  to  be  used if set. Otherwise, CPACK_PACK‐
419              AGE_DESCRIPTION_SUMMARY will be added as the first line  of  de‐
420              scription as defined in Debian Policy Manual.
421
422              New in version 3.3: Per-component CPACK_COMPONENT_<compName>_DE‐
423              SCRIPTION variables.
424
425
426              New in version 3.16: Per-component  CPACK_DEBIAN_<COMPONENT>_DE‐
427              SCRIPTION variables.
428
429
430              New  in  version  3.16: The CPACK_PACKAGE_DESCRIPTION_FILE vari‐
431              able.
432
433
434       CPACK_DEBIAN_PACKAGE_SECTION
435
436       CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION
437              Set Section control field e.g. admin, devel, doc, ...
438
439              • Mandatory : YES
440
441              • Default   : "devel"
442
443              New in version 3.5: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
444              AGE_SECTION variables.
445
446
447              See
448              https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
449
450       CPACK_DEBIAN_ARCHIVE_TYPE
451              New in version 3.7.
452
453
454              Deprecated since version 3.14.
455
456
457              The archive format used for creating the Debian package.
458
459              • Mandatory : YES
460
461              • Default   : "gnutar"
462
463              Possible value is:
464
465              • gnutar
466
467              NOTE:
468                 This  variable  previously  defaulted  to the paxr value, but
469                 dpkg has never supported that tar format. For backwards  com‐
470                 patibility the paxr value will be mapped to gnutar and a dep‐
471                 recation message will be emitted.
472
473       CPACK_DEBIAN_COMPRESSION_TYPE
474              New in version 3.1.
475
476
477              The compression used for creating the Debian package.
478
479              • Mandatory : YES
480
481              • Default   : "gzip"
482
483              Possible values are:
484
485              • lzma
486
487              • xz
488
489              • bzip2
490
491              • gzip
492
493       CPACK_DEBIAN_PACKAGE_PRIORITY
494
495       CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY
496              Set Priority control field e.g. required,  important,  standard,
497              optional, extra
498
499              • Mandatory : YES
500
501              • Default   : "optional"
502
503              New in version 3.5: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
504              AGE_PRIORITY varables.
505
506
507              See
508              https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities
509
510       CPACK_DEBIAN_PACKAGE_HOMEPAGE
511              The URL of the web site for this package, preferably  (when  ap‐
512              plicable)  the  site  from  which the original source can be ob‐
513              tained and any additional upstream documentation or  information
514              may be found.
515
516              • Mandatory : NO
517
518              • Default   : CMAKE_PROJECT_HOMEPAGE_URL
519
520              New in version 3.12: The CMAKE_PROJECT_HOMEPAGE_URL variable.
521
522
523              NOTE:
524                 The  content  of  this field is a simple URL without any sur‐
525                 rounding characters such as <>.
526
527       CPACK_DEBIAN_PACKAGE_SHLIBDEPS
528
529       CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS
530              May be set to ON in order to use dpkg-shlibdeps to generate bet‐
531              ter package dependency list.
532
533              • Mandatory : NO
534
535              • Default   :
536
537CPACK_DEBIAN_PACKAGE_SHLIBDEPS if set or
538
539                • OFF
540
541              NOTE:
542                 You  may need set CMAKE_INSTALL_RPATH to an appropriate value
543                 if you use this feature, because if you don't  dpkg-shlibdeps
544                 may    fail    to   find   your   own   shared   libs.    See
545                 https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
546
547              NOTE:
548                 You  can also set CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS
549                 to an appropriate value if you use this feature, in order  to
550                 please  dpkg-shlibdeps.  However, you should only do this for
551                 private shared libraries that could not get  resolved  other‐
552                 wise.
553
554              New in version 3.3: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
555              AGE_SHLIBDEPS variables.
556
557
558              New in version 3.6: Correct handling  of  $ORIGIN  in  CMAKE_IN‐
559              STALL_RPATH.
560
561
562       CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS
563              New in version 3.20.
564
565
566              May  be  set  to  a  list  of  directories that will be given to
567              dpkg-shlibdeps via its -l option.  These  will  be  searched  by
568              dpkg-shlibdeps in order to find private shared library dependen‐
569              cies.
570
571              • Mandatory : NO
572
573              • Default   :
574
575              NOTE:
576                 You should prefer to set CMAKE_INSTALL_RPATH to an  appropri‐
577                 ate  value  if  you use dpkg-shlibdeps. The current option is
578                 really only needed for private shared library dependencies.
579
580       CPACK_DEBIAN_PACKAGE_DEBUG
581              May be set when invoking cpack in order to trace debug  informa‐
582              tion during the CPack DEB generator run.
583
584              • Mandatory : NO
585
586              • Default   : -
587
588       CPACK_DEBIAN_PACKAGE_PREDEPENDS
589
590       CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS
591              Sets the Pre-Depends field of the Debian package.  Like Depends,
592              except that it also forces dpkg to complete installation of  the
593              packages  named  before  even  starting  the installation of the
594              package which declares the pre-dependency.
595
596              • Mandatory : NO
597
598              • Default   :
599
600                • An empty string for non-component based installations
601
602CPACK_DEBIAN_PACKAGE_PREDEPENDS for component-based  instal‐
603                  lations.
604
605              New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
606              AGE_PREDEPENDS variables.
607
608
609              See
610              http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
611
612       CPACK_DEBIAN_PACKAGE_ENHANCES
613
614       CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES
615              Sets the Enhances field  of  the  Debian  package.   Similar  to
616              Suggests  but  works  in the opposite direction: declares that a
617              package can enhance the functionality of another package.
618
619              • Mandatory : NO
620
621              • Default   :
622
623                • An empty string for non-component based installations
624
625CPACK_DEBIAN_PACKAGE_ENHANCES for component-based  installa‐
626                  tions.
627
628              New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
629              AGE_ENHANCES variables.
630
631
632              See
633              http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
634
635       CPACK_DEBIAN_PACKAGE_BREAKS
636
637       CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS
638              Sets the Breaks field of the  Debian  package.   When  a  binary
639              package  (P)  declares  that  it breaks other packages (B), dpkg
640              will not allow the package (P) which declares Breaks be unpacked
641              unless  the  packages  that  will be broken (B) are deconfigured
642              first.  As long as the package (P) is configured, the previously
643              deconfigured packages (B) cannot be reconfigured again.
644
645              • Mandatory : NO
646
647              • Default   :
648
649                • An empty string for non-component based installations
650
651CPACK_DEBIAN_PACKAGE_BREAKS  for  component-based  installa‐
652                  tions.
653
654              New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
655              AGE_BREAKS variables.
656
657
658              See
659              https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks
660
661       CPACK_DEBIAN_PACKAGE_CONFLICTS
662
663       CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONFLICTS
664              Sets the Conflicts field of the Debian package.  When one binary
665              package declares a  conflict  with  another  using  a  Conflicts
666              field,  dpkg will not allow them to be unpacked on the system at
667              the same time.
668
669              • Mandatory : NO
670
671              • Default   :
672
673                • An empty string for non-component based installations
674
675CPACK_DEBIAN_PACKAGE_CONFLICTS for component-based installa‐
676                  tions.
677
678              New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
679              AGE_CONFLICTS variables.
680
681
682              See
683              https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts
684
685              NOTE:
686                 This is a stronger restriction than  Breaks,  which  prevents
687                 the  broken  package from being configured while the breaking
688                 package is in the "Unpacked" state but allows  both  packages
689                 to be unpacked at the same time.
690
691       CPACK_DEBIAN_PACKAGE_PROVIDES
692
693       CPACK_DEBIAN_<COMPONENT>_PACKAGE_PROVIDES
694              Sets  the Provides field of the Debian package.  A virtual pack‐
695              age is one which appears in the Provides control  field  of  an‐
696              other package.
697
698              • Mandatory : NO
699
700              • Default   :
701
702                • An empty string for non-component based installations
703
704CPACK_DEBIAN_PACKAGE_PROVIDES  for component-based installa‐
705                  tions.
706
707              New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
708              AGE_PROVIDES variables.
709
710
711              See
712              https://www.debian.org/doc/debian-policy/ch-relationships.html#s-virtual
713
714       CPACK_DEBIAN_PACKAGE_REPLACES
715
716       CPACK_DEBIAN_<COMPONENT>_PACKAGE_REPLACES
717              Sets the Replaces field of the Debian package.  Packages can de‐
718              clare in their control file that they should overwrite files  in
719              certain other packages, or completely replace other packages.
720
721              • Mandatory : NO
722
723              • Default   :
724
725                • An empty string for non-component based installations
726
727CPACK_DEBIAN_PACKAGE_REPLACES  for component-based installa‐
728                  tions.
729
730              New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
731              AGE_REPLACES variables.
732
733
734              See
735              http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
736
737       CPACK_DEBIAN_PACKAGE_RECOMMENDS
738
739       CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS
740              Sets  the  Recommends field of the Debian package.  Allows pack‐
741              ages to declare a strong, but not absolute, dependency on  other
742              packages.
743
744              • Mandatory : NO
745
746              • Default   :
747
748                • An empty string for non-component based installations
749
750CPACK_DEBIAN_PACKAGE_RECOMMENDS  for component-based instal‐
751                  lations.
752
753              New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
754              AGE_RECOMMENDS variables.
755
756
757              See
758              http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
759
760       CPACK_DEBIAN_PACKAGE_SUGGESTS
761
762       CPACK_DEBIAN_<COMPONENT>_PACKAGE_SUGGESTS
763              Sets  the Suggests field of the Debian package.  Allows packages
764              to declare a suggested package install grouping.
765
766              • Mandatory : NO
767
768              • Default   :
769
770                • An empty string for non-component based installations
771
772CPACK_DEBIAN_PACKAGE_SUGGESTS for component-based  installa‐
773                  tions.
774
775              New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
776              AGE_SUGGESTS variables.
777
778
779              See
780              http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
781
782       CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS
783              New in version 3.6.
784
785
786              • Mandatory : NO
787
788              • Default   : OFF
789
790              Allows to generate shlibs control file  automatically.  Compati‐
791              bility is defined by CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY
792              variable value.
793
794              NOTE:
795                 Libraries are only considered if they have both library  name
796                 and  version set. This can be done by setting SOVERSION prop‐
797                 erty with set_target_properties() command.
798
799       CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY
800              New in version 3.6.
801
802
803              Compatibility policy for auto-generated shlibs control file.
804
805              • Mandatory : NO
806
807              • Default   : "="
808
809              Defines compatibility policy for auto-generated  shlibs  control
810              file.  Possible values: "=", ">="
811
812              See
813              https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-sharedlibs-shlibdeps
814
815       CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
816
817       CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONTROL_EXTRA
818              This  variable  allow  advanced user to add custom script to the
819              control.tar.gz.   Typical  usage  is  for  conffiles,  postinst,
820              postrm, prerm.
821
822              • Mandatory : NO
823
824              • Default   : -
825
826              Usage:
827
828                 set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
829                     "${CMAKE_CURRENT_SOURCE_DIR}/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
830
831              New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACK‐
832              AGE_CONTROL_EXTRA variables.
833
834
835       CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION
836
837       CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONTROL_STRICT_PERMISSION
838              New in version 3.4.
839
840
841              This variable indicates if the Debian policy  on  control  files
842              should be strictly followed.
843
844              • Mandatory : NO
845
846              • Default   : FALSE
847
848              Usage:
849
850                 set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE)
851
852              This  overrides the permissions on the original files, following
853              the       rules        set        by        Debian        policy
854              https://www.debian.org/doc/debian-policy/ch-files.html#s-permissions-owners
855
856              NOTE:
857                 The original permissions of the files will be used in the fi‐
858                 nal package unless this variable is set to TRUE.  In particu‐
859                 lar, the scripts should have the proper executable flag prior
860                 to the generation of the package.
861
862       CPACK_DEBIAN_PACKAGE_SOURCE
863
864       CPACK_DEBIAN_<COMPONENT>_PACKAGE_SOURCE
865              New in version 3.5.
866
867
868              Sets  the  Source  field of the binary Debian package.  When the
869              binary package name is not the same as the source  package  name
870              (in  particular  when  several components/binaries are generated
871              from one source) the source from which the binary has been  gen‐
872              erated should be indicated with the field Source.
873
874              • Mandatory : NO
875
876              • Default   :
877
878                • An empty string for non-component based installations
879
880CPACK_DEBIAN_PACKAGE_SOURCE  for  component-based  installa‐
881                  tions.
882
883              See
884              https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source
885
886              NOTE:
887                 This value is not interpreted. It is possible to pass an  op‐
888                 tional  revision  number  of the referenced source package as
889                 well.
890
891   Packaging of debug information
892       New in version 3.13.
893
894
895       Dbgsym packages contain debug symbols for debugging packaged binaries.
896
897       Dbgsym packaging has its own set of variables:
898
899       CPACK_DEBIAN_DEBUGINFO_PACKAGE
900
901       CPACK_DEBIAN_<component>_DEBUGINFO_PACKAGE
902              Enable generation of dbgsym .ddeb package(s).
903
904              • Mandatory : NO
905
906              • Default   : OFF
907
908       NOTE:
909          Binaries must contain debug symbols before packaging so  use  either
910          Debug or RelWithDebInfo for CMAKE_BUILD_TYPE variable value.
911
912   Building Debian packages on Windows
913       New in version 3.10.
914
915
916       To  communicate  UNIX  file  permissions  from the install stage to the
917       CPack DEB generator the "cmake_mode_t" NTFS alternate data stream (ADT)
918       is used.
919
920       When  a  filesystem  without  ADT support is used only owner read/write
921       permissions can be preserved.
922
923   Reproducible packages
924       New in version 3.13.
925
926
927       The environment variable SOURCE_DATE_EPOCH may be set to a  UNIX  time‐
928       stamp,  defined as the number of seconds, excluding leap seconds, since
929       01 Jan 1970 00:00:00 UTC.  If set, the CPack DEB generator will use its
930       value for timestamps in the package.
931
932   CPack DragNDrop Generator
933       The DragNDrop CPack generator (macOS) creates a DMG image.
934
935   Variables specific to CPack DragNDrop generator
936       The  following variables are specific to the DragNDrop installers built
937       on macOS:
938
939       CPACK_DMG_VOLUME_NAME
940              The volume  name  of  the  generated  disk  image.  Defaults  to
941              CPACK_PACKAGE_FILE_NAME.
942
943       CPACK_DMG_FORMAT
944              The  disk image format. Common values are UDRO (UDIF read-only),
945              UDZO (UDIF zlib-compressed) or UDBZ (UDIF bzip2-compressed). Re‐
946              fer  to  hdiutil(1) for more information on other available for‐
947              mats. Defaults to UDZO.
948
949       CPACK_DMG_DS_STORE
950              Path to a custom .DS_Store file. This .DS_Store file can be used
951              to  specify the Finder window position/geometry and layout (such
952              as hidden toolbars, placement of the icons etc.). This file  has
953              to be generated by the Finder (either manually or through Apple‐
954              Script) using a normal folder from which the .DS_Store file  can
955              then be extracted.
956
957       CPACK_DMG_DS_STORE_SETUP_SCRIPT
958              New in version 3.5.
959
960
961              Path  to a custom AppleScript file.  This AppleScript is used to
962              generate a .DS_Store file which specifies the Finder window  po‐
963              sition/geometry  and  layout (such as hidden toolbars, placement
964              of the icons etc.).  By specifying a custom AppleScript there is
965              no need to use CPACK_DMG_DS_STORE, as the .DS_Store that is gen‐
966              erated by the AppleScript will be packaged.
967
968       CPACK_DMG_BACKGROUND_IMAGE
969              Path to an image file to be used as the background.   This  file
970              will  be  copied to .background/background.<ext>, where <ext> is
971              the original image file extension.  The background image is  in‐
972              stalled into the image before CPACK_DMG_DS_STORE_SETUP_SCRIPT is
973              executed or CPACK_DMG_DS_STORE  is  installed.   By  default  no
974              background image is set.
975
976       CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK
977              New in version 3.6.
978
979
980              Default  behaviour  is  to include a symlink to /Applications in
981              the DMG.  Set this option to ON to avoid adding the symlink.
982
983       CPACK_DMG_SLA_DIR
984              New in version 3.5.
985
986
987              Directory where license and menu files for  different  languages
988              are  stored.   Setting  this  causes  CPack  to look for a <lan‐
989              guage>.menu.txt  and  <language>.license.txt  or  <language>.li‐
990              cense.rtf  file for every language defined in CPACK_DMG_SLA_LAN‐
991              GUAGES.  If both this variable  and  CPACK_RESOURCE_FILE_LICENSE
992              are  set,  CPack  will  only look for the menu files and use the
993              same license file for all  languages.   If  both  <language>.li‐
994              cense.txt  and  <language>.license.rtf exist, the .txt file will
995              be used.
996
997              New in version 3.17: RTF support.
998
999
1000       CPACK_DMG_SLA_LANGUAGES
1001              New in version 3.5.
1002
1003
1004              Languages for which a license agreement is provided when  mount‐
1005              ing  the generated DMG. A menu file consists of 9 lines of text.
1006              The first line is is the name of the language itself, uppercase,
1007              in  English  (e.g. German).  The other lines are translations of
1008              the following strings:
1009
1010              • Agree
1011
1012              • Disagree
1013
1014              • Print
1015
1016              • Save...
1017
1018              • You agree to the terms of the License Agreement when you click
1019                the "Agree" button.
1020
1021              • Software License Agreement
1022
1023              • This  text cannot be saved. The disk may be full or locked, or
1024                the file may be locked.
1025
1026              • Unable to print. Make sure you have selected a printer.
1027
1028              For every language in this list, CPack will try  to  find  files
1029              <language>.menu.txt  and <language>.license.txt in the directory
1030              specified by the CPACK_DMG_SLA_DIR variable.
1031
1032       CPACK_DMG_<component>_FILE_NAME
1033              New in version 3.17.
1034
1035
1036              File name when packaging <component> as its own DMG  (CPACK_COM‐
1037              PONENTS_GROUPING set to IGNORE).
1038
1039              • Default: CPACK_PACKAGE_FILE_NAME-<component>
1040
1041       CPACK_COMMAND_HDIUTIL
1042              Path  to  the  hdiutil(1)  command used to operate on disk image
1043              files on macOS. This variable can be used to override the  auto‐
1044              matically  detected  command  (or  specify  its  location if the
1045              auto-detection fails to find it).
1046
1047       CPACK_COMMAND_SETFILE
1048              Path to the SetFile(1) command used to set  extended  attributes
1049              on  files and directories on macOS. This variable can be used to
1050              override the automatically detected command (or specify its  lo‐
1051              cation if the auto-detection fails to find it).
1052
1053       CPACK_COMMAND_REZ
1054              Path  to  the Rez(1) command used to compile resources on macOS.
1055              This variable can be used to override the automatically detected
1056              command  (or specify its location if the auto-detection fails to
1057              find it).
1058
1059   CPack External Generator
1060       New in version 3.13.
1061
1062
1063       CPack provides many generators to create  packages  for  a  variety  of
1064       platforms and packaging systems. The intention is for CMake/CPack to be
1065       a complete end-to-end solution for building and  packaging  a  software
1066       project.  However,  it  may not always be possible to use CPack for the
1067       entire packaging process, due to either technical limitations or  poli‐
1068       cies that require the use of certain tools. For this reason, CPack pro‐
1069       vides the "External" generator, which allows external  packaging  soft‐
1070       ware  to take advantage of some of the functionality provided by CPack,
1071       such as component installation and the dependency graph.
1072
1073   Integration with External Packaging Tools
1074       The CPack External generator generates  a  .json  file  containing  the
1075       CPack  internal  metadata, which gives external software information on
1076       how to package the software. External packaging software may itself in‐
1077       voke  CPack,  consume the generated metadata, install and package files
1078       as required.
1079
1080       Alternatively CPack can invoke an external packaging  software  through
1081       an  optional  custom  CMake script in CPACK_EXTERNAL_PACKAGE_SCRIPT in‐
1082       stead.
1083
1084       Staging of installation files may also optionally be taken care  of  by
1085       the  generator  when  enabled through the CPACK_EXTERNAL_ENABLE_STAGING
1086       variable.
1087
1088   JSON Format
1089       The JSON metadata file contains a list of CPack components  and  compo‐
1090       nent  groups,  the  various options passed to cpack_add_component() and
1091       cpack_add_component_group(), the dependencies  between  the  components
1092       and component groups, and various other options passed to CPack.
1093
1094       The JSON's root object will always provide two fields: formatVersionMa‐
1095       jor and formatVersionMinor, which are always integers that describe the
1096       output  format  of  the  generator. Backwards-compatible changes to the
1097       output format (for example, adding a new field that  didn't  exist  be‐
1098       fore)  cause  the minor version to be incremented, and backwards-incom‐
1099       patible changes (for example, deleting a field or changing its meaning)
1100       cause  the  major version to be incremented and the minor version reset
1101       to 0. The format version is always of the format major.minor. In  other
1102       words, it always has exactly two parts, separated by a period.
1103
1104       You  can  request one or more specific versions of the output format as
1105       described below with CPACK_EXTERNAL_REQUESTED_VERSIONS. The output for‐
1106       mat  will have a major version that exactly matches the requested major
1107       version, and a minor version that is greater than or equal to  the  re‐
1108       quested    minor   version.   If   no   version   is   requested   with
1109       CPACK_EXTERNAL_REQUESTED_VERSIONS, the latest known  major  version  is
1110       used  by default. Currently, the only supported format is 1.0, which is
1111       described below.
1112
1113   Version 1.0
1114       In addition to the standard format fields, format version 1.0  provides
1115       the following fields in the root:
1116
1117       components
1118              The  components  field  is an object with component names as the
1119              keys and objects describing the components as  the  values.  The
1120              component objects have the following fields:
1121
1122              name   The name of the component. This is always the same as the
1123                     key in the components object.
1124
1125              displayName
1126                     The  value  of   the   DISPLAY_NAME   field   passed   to
1127                     cpack_add_component().
1128
1129              description
1130                     The   value   of   the   DESCRIPTION   field   passed  to
1131                     cpack_add_component().
1132
1133              isHidden
1134                     True if HIDDEN was passed to cpack_add_component(), false
1135                     if it was not.
1136
1137              isRequired
1138                     True  if  REQUIRED  was  passed to cpack_add_component(),
1139                     false if it was not.
1140
1141              isDisabledByDefault
1142                     True if DISABLED  was  passed  to  cpack_add_component(),
1143                     false if it was not.
1144
1145              group  Only  present  if  GROUP  was  passed to cpack_add_compo‐
1146                     nent(). If so, this field is a  string  value  containing
1147                     the component's group.
1148
1149              dependencies
1150                     An  array  of  components  the component depends on. This
1151                     contains the values in the  DEPENDS  argument  passed  to
1152                     cpack_add_component(). If no DEPENDS argument was passed,
1153                     this is an empty list.
1154
1155              installationTypes
1156                     An array of installation types the component is part  of.
1157                     This  contains  the  values in the INSTALL_TYPES argument
1158                     passed to cpack_add_component(). If no INSTALL_TYPES  ar‐
1159                     gument was passed, this is an empty list.
1160
1161              isDownloaded
1162                     True  if  DOWNLOADED was passed to cpack_add_component(),
1163                     false if it was not.
1164
1165              archiveFile
1166                     The name of the archive file passed with the ARCHIVE_FILE
1167                     argument to cpack_add_component(). If no ARCHIVE_FILE ar‐
1168                     gument was passed, this is an empty string.
1169
1170       componentGroups
1171              The componentGroups field is  an  object  with  component  group
1172              names as the keys and objects describing the component groups as
1173              the values. The  component  group  objects  have  the  following
1174              fields:
1175
1176              name   The  name of the component group. This is always the same
1177                     as the key in the componentGroups object.
1178
1179              displayName
1180                     The  value  of   the   DISPLAY_NAME   field   passed   to
1181                     cpack_add_component_group().
1182
1183              description
1184                     The   value   of   the   DESCRIPTION   field   passed  to
1185                     cpack_add_component_group().
1186
1187              parentGroup
1188                     Only present if PARENT_GROUP was passed to cpack_add_com‐
1189                     ponent_group().  If so, this field is a string value con‐
1190                     taining the component group's parent group.
1191
1192              isExpandedByDefault
1193                     True  if  EXPANDED   was   passed   to   cpack_add_compo‐
1194                     nent_group(), false if it was not.
1195
1196              isBold True   if   BOLD_TITLE  was  passed  to  cpack_add_compo‐
1197                     nent_group(), false if it was not.
1198
1199              components
1200                     An array of names of components that are  direct  members
1201                     of  the  group  (components that have this group as their
1202                     GROUP). Components of subgroups are not included.
1203
1204              subgroups
1205                     An array of names of component groups that are  subgroups
1206                     of  the  group (groups that have this group as their PAR‐
1207                     ENT_GROUP).
1208
1209       installationTypes
1210              The installationTypes field is an object with installation  type
1211              names  as the keys and objects describing the installation types
1212              as the values. The installation type objects have the  following
1213              fields:
1214
1215              name   The  name  of  the  installation type. This is always the
1216                     same as the key in the installationTypes object.
1217
1218              displayName
1219                     The  value  of   the   DISPLAY_NAME   field   passed   to
1220                     cpack_add_install_type().
1221
1222              index  The integer index of the installation type in the list.
1223
1224       projects
1225              The  projects  field  is  an  array  of objects describing CMake
1226              projects which comprise the CPack project. The  values  in  this
1227              field  are  derived  from  CPACK_INSTALL_CMAKE_PROJECTS. In most
1228              cases, this will be only a single project. The  project  objects
1229              have the following fields:
1230
1231              projectName
1232                     The project name passed to CPACK_INSTALL_CMAKE_PROJECTS.
1233
1234              component
1235                     The  name  of  the  component or component set which com‐
1236                     prises the project.
1237
1238              directory
1239                     The build directory of the CMake project. This is the di‐
1240                     rectory which contains the cmake_install.cmake script.
1241
1242              subDirectory
1243                     The  subdirectory  to install the project into inside the
1244                     CPack package.
1245
1246       packageName
1247              The package name given in CPACK_PACKAGE_NAME.  Only  present  if
1248              this option is set.
1249
1250       packageVersion
1251              The package version given in CPACK_PACKAGE_VERSION. Only present
1252              if this option is set.
1253
1254       packageDescriptionFile
1255              The package description  file  given  in  CPACK_PACKAGE_DESCRIP‐
1256              TION_FILE. Only present if this option is set.
1257
1258       packageDescriptionSummary
1259              The  package description summary given in CPACK_PACKAGE_DESCRIP‐
1260              TION_SUMMARY. Only present if this option is set.
1261
1262       buildConfig
1263              The build configuration given to CPack with the -C option.  Only
1264              present if this option is set.
1265
1266       defaultDirectoryPermissions
1267              The  default  directory  permissions  given in CPACK_INSTALL_DE‐
1268              FAULT_DIRECTORY_PERMISSIONS. Only present if this option is set.
1269
1270       setDestdir
1271              True if CPACK_SET_DESTDIR is true, false if it is not.
1272
1273       packagingInstallPrefix
1274              The install prefix given in CPACK_PACKAGING_INSTALL_PREFIX. Only
1275              present if CPACK_SET_DESTDIR is true.
1276
1277       stripFiles
1278              True if CPACK_STRIP_FILES is true, false if it is not.
1279
1280       warnOnAbsoluteInstallDestination
1281              True   if  CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION  is  true,
1282              false if it is not.
1283
1284       errorOnAbsoluteInstallDestination
1285              True  if  CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION  is  true,
1286              false if it is not.
1287
1288   Variables specific to CPack External generator
1289       CPACK_EXTERNAL_REQUESTED_VERSIONS
1290              This variable is used to request a specific version of the CPack
1291              External generator. It is a list of  major.minor  values,  sepa‐
1292              rated by semicolons.
1293
1294              If this variable is set to a non-empty value, the CPack External
1295              generator will iterate through each item in the list  to  search
1296              for  a version that it knows how to generate. Requested versions
1297              should be listed in order of descending preference by the client
1298              software, as the first matching version in the list will be gen‐
1299              erated.
1300
1301              The generator knows how to generate the version if it has a ver‐
1302              sioned  generator  whose  major  version exactly matches the re‐
1303              quested major version, and whose minor version is  greater  than
1304              or  equal  to  the  requested  minor  version.  For  example, if
1305              CPACK_EXTERNAL_REQUESTED_VERSIONS contains 1.0,  and  the  CPack
1306              External  generator  knows how to generate 1.1, it will generate
1307              1.1.  If the generator doesn't know how to generate a version in
1308              the  list, it skips the version and looks at the next one. If it
1309              doesn't know how to generate any of the requested  versions,  an
1310              error is thrown.
1311
1312              If  this  variable  is  not set, or is empty, the CPack External
1313              generator will generate the highest major and minor version that
1314              it knows how to generate.
1315
1316              If  an  invalid  version  is  encountered  in CPACK_EXTERNAL_RE‐
1317              QUESTED_VERSIONS (one that doesn't match major.minor, where  ma‐
1318              jor and minor are integers), it is ignored.
1319
1320       CPACK_EXTERNAL_ENABLE_STAGING
1321              This variable can be set to true to enable optional installation
1322              into a temporary staging area which can then be  picked  up  and
1323              packaged by an external packaging tool.  The top level directory
1324              used by CPack for the current packaging  task  is  contained  in
1325              CPACK_TOPLEVEL_DIRECTORY.   It  is  automatically  cleaned up on
1326              each run before packaging is initiated and can be used for  cus‐
1327              tom temporary files required by the external packaging tool.  It
1328              also contains the staging  area  CPACK_TEMPORARY_DIRECTORY  into
1329              which CPack performs the installation when staging is enabled.
1330
1331       CPACK_EXTERNAL_PACKAGE_SCRIPT
1332              This  variable  can  optionally specify the full path to a CMake
1333              script file to be run as part of the CPack  invocation.   It  is
1334              invoked  after  (optional) staging took place and may run an ex‐
1335              ternal packaging tool. The script has access  to  the  variables
1336              defined by the CPack config file.
1337
1338       CPACK_EXTERNAL_BUILT_PACKAGES
1339              New in version 3.19.
1340
1341
1342              The CPACK_EXTERNAL_PACKAGE_SCRIPT script may set this list vari‐
1343              able to the full paths of generated package files.   CPack  will
1344              copy  these  files  from  the  staging directory back to the top
1345              build directory and  possibly  produce  checksum  files  if  the
1346              CPACK_PACKAGE_CHECKSUM is set.
1347
1348   CPack FreeBSD Generator
1349       New in version 3.10.
1350
1351
1352       The built in (binary) CPack FreeBSD (pkg) generator (Unix only)
1353
1354   Variables affecting the CPack FreeBSD (pkg) generator
1355       • New in version 3.18: CPACK_ARCHIVE_THREADS
1356
1357
1358   Variables specific to CPack FreeBSD (pkg) generator
1359       The  CPack  FreeBSD  generator may be used to create pkg(8) packages --
1360       these may be used on FreeBSD, DragonflyBSD, NetBSD, OpenBSD,  but  also
1361       on Linux or OSX, depending on the installed package-management tools --
1362       using CPack.
1363
1364       The CPack FreeBSD generator is a CPack generator and uses the CPACK_XXX
1365       variables  used by CPack. It tries to re-use packaging information that
1366       may already be specified for Debian packages for the CPack DEB  Genera‐
1367       tor. It also tries to re-use RPM packaging information when Debian does
1368       not specify.
1369
1370       The CPack FreeBSD generator should work on any  host  with  libpkg  in‐
1371       stalled. The packages it produces are specific to the host architecture
1372       and ABI.
1373
1374       The CPack FreeBSD generator sets package-metadata  through  CPACK_FREE‐
1375       BSD_XXX  variables.  The  CPack FreeBSD generator, unlike the CPack Deb
1376       generator, does not specially support componentized packages; a  single
1377       package  is  created  from  all  the software artifacts created through
1378       CMake.
1379
1380       All of the variables can be set specifically for FreeBSD  packaging  in
1381       the  CPackConfig  file  or in CMakeLists.txt, but most of them have de‐
1382       faults that use  general  settings  (e.g.  CMAKE_PROJECT_NAME)  or  De‐
1383       bian-specific  variables when those make sense (e.g. the homepage of an
1384       upstream project is usually unchanged by the flavor of packaging). When
1385       there  is  no Debian information to fall back on, but the RPM packaging
1386       has it, fall back to the RPM information (e.g. package license).
1387
1388       CPACK_FREEBSD_PACKAGE_NAME
1389              Sets the package name (in the package manifest, but also affects
1390              the output filename).
1391
1392              • Mandatory: YES
1393
1394              • Default:
1395
1396CPACK_PACKAGE_NAME  (this  is  always  set  by CPack itself,
1397                  based on CMAKE_PROJECT_NAME).
1398
1399       CPACK_FREEBSD_PACKAGE_COMMENT
1400              Sets the package comment. This is  the  short  description  dis‐
1401              played by pkg(8) in standard "pkg info" output.
1402
1403              • Mandatory: YES
1404
1405              • Default:
1406
1407CPACK_PACKAGE_DESCRIPTION_SUMMARY  (this  is  always  set by
1408                  CPack itself, if nothing else sets it explicitly).
1409
1410PROJECT_DESCRIPTION (this can be set  with  the  DESCRIPTION
1411                  parameter for project()).
1412
1413       CPACK_FREEBSD_PACKAGE_DESCRIPTION
1414              Sets  the  package  description. This is the long description of
1415              the package, given by "pkg info" with a specific package as  ar‐
1416              gument.
1417
1418              • Mandatory: YES
1419
1420              • Default:
1421
1422CPACK_DEBIAN_PACKAGE_DESCRIPTION  (this  may  be set already
1423                  for Debian packaging, so we may as well re-use it).
1424
1425       CPACK_FREEBSD_PACKAGE_WWW
1426              The URL of the web site for this package, preferably  (when  ap‐
1427              plicable)  the  site  from  which the original source can be ob‐
1428              tained and any additional upstream documentation or  information
1429              may be found.
1430
1431              • Mandatory: YES
1432
1433              • Default:
1434
1435CMAKE_PROJECT_HOMEPAGE_URL,   or   if   that  is  not  set,
1436                   CPACK_DEBIAN_PACKAGE_HOMEPAGE (this may be set already  for
1437                   Debian packaging, so we may as well re-use it).
1438
1439              New in version 3.12: The CMAKE_PROJECT_HOMEPAGE_URL variable.
1440
1441
1442       CPACK_FREEBSD_PACKAGE_LICENSE
1443              The  license, or licenses, which apply to this software package.
1444              This must be one or more license-identifiers that pkg recognizes
1445              as acceptable license identifiers (e.g. "GPLv2").
1446
1447              • Mandatory: YES
1448
1449              • Default:
1450
1451CPACK_RPM_PACKAGE_LICENSE
1452
1453       CPACK_FREEBSD_PACKAGE_LICENSE_LOGIC
1454              This  variable  is  only of importance if there is more than one
1455              license.  The default is "single", which is only applicable to a
1456              single  license.   Other acceptable values are determined by pkg
1457              -- those are "dual" or "multi" -- meaning choice (OR) or  simul‐
1458              taneous (AND) application of the licenses.
1459
1460              • Mandatory: NO
1461
1462              • Default: single
1463
1464       CPACK_FREEBSD_PACKAGE_MAINTAINER
1465              The FreeBSD maintainer (e.g. kde@freebsd.org) of this package.
1466
1467              • Mandatory: YES
1468
1469              • Default: none
1470
1471       CPACK_FREEBSD_PACKAGE_ORIGIN
1472              The  origin (ports label) of this package; for packages built by
1473              CPack outside of the ports system this is  of  less  importance.
1474              The  default  puts the package somewhere under misc/, as a stop‐
1475              gap.
1476
1477              • Mandatory: YES
1478
1479              • Default: misc/<package name>
1480
1481       CPACK_FREEBSD_PACKAGE_CATEGORIES
1482              The ports categories where this package lives (if it were to  be
1483              built  from  ports).  If none is set a single category is deter‐
1484              mined based on the package origin.
1485
1486              • Mandatory: YES
1487
1488              • Default: derived from ORIGIN
1489
1490       CPACK_FREEBSD_PACKAGE_DEPS
1491              A list of package origins that should be added as package depen‐
1492              dencies.   These  are in the form <category>/<packagename>, e.g.
1493              x11/libkonq.  No version information needs to be provided  (this
1494              is not included in the manifest).
1495
1496              • Mandatory: NO
1497
1498              • Default: empty
1499
1500   CPack IFW Generator
1501       New in version 3.1.
1502
1503
1504       Configure  and  run  the  Qt  Installer  Framework to generate a Qt in‐
1505       staller.
1506
1507   Overview
1508       This cpack generator generates configuration and meta  information  for
1509       the  Qt Installer Framework (QtIFW), and runs QtIFW tools to generate a
1510       Qt installer.
1511
1512       QtIFW provides tools and utilities to create installers for  the  plat‐
1513       forms supported by Qt: Linux, Microsoft Windows, and macOS.
1514
1515       To make use of this generator, QtIFW needs to be installed.  The CPack‐
1516       IFW module looks for the location of the QtIFW command-line  utilities,
1517       and defines several commands to control the behavior of this generator.
1518
1519   Variables
1520       You  can  use  the  following variables to change behavior of CPack IFW
1521       generator.
1522
1523   Debug
1524       CPACK_IFW_VERBOSE
1525              New in version 3.3.
1526
1527
1528              Set to ON to enable addition debug output.  By default is OFF.
1529
1530   Package
1531       CPACK_IFW_PACKAGE_TITLE
1532              Name of the installer as displayed on the title bar.  By default
1533              used CPACK_PACKAGE_DESCRIPTION_SUMMARY.
1534
1535       CPACK_IFW_PACKAGE_PUBLISHER
1536              Publisher  of  the  software  (as  shown  in the Windows Control
1537              Panel).  By default used CPACK_PACKAGE_VENDOR.
1538
1539       CPACK_IFW_PRODUCT_URL
1540              URL to a page that contains  product  information  on  your  web
1541              site.
1542
1543       CPACK_IFW_PACKAGE_ICON
1544              Filename for a custom installer icon. The actual file is '.icns'
1545              (macOS), '.ico' (Windows). No functionality on Unix.
1546
1547       CPACK_IFW_PACKAGE_WINDOW_ICON
1548              Filename for a custom window icon in  PNG  format  for  the  In‐
1549              staller application.
1550
1551       CPACK_IFW_PACKAGE_LOGO
1552              Filename for a logo is used as QWizard::LogoPixmap.
1553
1554       CPACK_IFW_PACKAGE_WATERMARK
1555              New in version 3.8.
1556
1557
1558              Filename for a watermark is used as QWizard::WatermarkPixmap.
1559
1560       CPACK_IFW_PACKAGE_BANNER
1561              New in version 3.8.
1562
1563
1564              Filename for a banner is used as QWizard::BannerPixmap.
1565
1566       CPACK_IFW_PACKAGE_BACKGROUND
1567              New in version 3.8.
1568
1569
1570              Filename  for  an  image used as QWizard::BackgroundPixmap (only
1571              used by MacStyle).
1572
1573       CPACK_IFW_PACKAGE_WIZARD_STYLE
1574              New in version 3.8.
1575
1576
1577              Wizard style to be used ("Modern", "Mac", "Aero" or "Classic").
1578
1579       CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH
1580              New in version 3.8.
1581
1582
1583              Default width of the wizard in pixels. Setting  a  banner  image
1584              will override this.
1585
1586       CPACK_IFW_PACKAGE_WIZARD_DEFAULT_HEIGHT
1587              New in version 3.8.
1588
1589
1590              Default  height of the wizard in pixels. Setting a watermark im‐
1591              age will override this.
1592
1593       CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST
1594              New in version 3.20.
1595
1596
1597              Set to OFF if the widget listing installer  pages  on  the  left
1598              side of the wizard should not be shown.
1599
1600              It is ON by default, but will only have an effect if using QtIFW
1601              4.0 or later.
1602
1603       CPACK_IFW_PACKAGE_TITLE_COLOR
1604              New in version 3.8.
1605
1606
1607              Color of the titles and subtitles (takes  an  HTML  color  code,
1608              such as "#88FF33").
1609
1610       CPACK_IFW_PACKAGE_STYLE_SHEET
1611              New in version 3.15.
1612
1613
1614              Filename for a stylesheet.
1615
1616       CPACK_IFW_TARGET_DIRECTORY
1617              Default  target  directory  for  installation.   By default used
1618              "@ApplicationsDir@/CPACK_PACKAGE_INSTALL_DIRECTORY"   (variables
1619              embedded in '@' are expanded by the QtIFW scripting engine).
1620
1621              You can use predefined variables.
1622
1623       CPACK_IFW_ADMIN_TARGET_DIRECTORY
1624              Default  target  directory  for  installation with administrator
1625              rights.
1626
1627              You can use predefined variables.
1628
1629       CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR
1630              New in version 3.11.
1631
1632
1633              Set to OFF if the target directory should not  be  deleted  when
1634              uninstalling.
1635
1636              Is ON by default
1637
1638       CPACK_IFW_PACKAGE_GROUP
1639              The group, which will be used to configure the root package
1640
1641       CPACK_IFW_PACKAGE_NAME
1642              The root package name, which will be used if configuration group
1643              is not specified
1644
1645       CPACK_IFW_PACKAGE_START_MENU_DIRECTORY
1646              New in version 3.3.
1647
1648
1649              Name of the default program group for the product in the Windows
1650              Start menu.
1651
1652              By default used CPACK_IFW_PACKAGE_NAME.
1653
1654       CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME
1655              New in version 3.3.
1656
1657
1658              Filename  of  the generated maintenance tool.  The platform-spe‐
1659              cific executable file extension is appended.
1660
1661              By default used QtIFW defaults (maintenancetool).
1662
1663       CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE
1664              New in version 3.3.
1665
1666
1667              Filename for the  configuration  of  the  generated  maintenance
1668              tool.
1669
1670              By default used QtIFW defaults (maintenancetool.ini).
1671
1672       CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS
1673              New in version 3.3.
1674
1675
1676              Set to ON if the installation path can contain non-ASCII charac‐
1677              ters.
1678
1679              Is ON for QtIFW less 2.0 tools.
1680
1681       CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH
1682              New in version 3.3.
1683
1684
1685              Set to OFF if the installation path cannot contain space charac‐
1686              ters.
1687
1688              Is ON for QtIFW less 2.0 tools.
1689
1690       CPACK_IFW_PACKAGE_CONTROL_SCRIPT
1691              New in version 3.3.
1692
1693
1694              Filename for a custom installer control script.
1695
1696       CPACK_IFW_PACKAGE_RESOURCES
1697              New in version 3.7.
1698
1699
1700              List  of  additional  resources ('.qrc' files) to include in the
1701              installer binary.
1702
1703              You can use cpack_ifw_add_package_resources() command to resolve
1704              relative paths.
1705
1706       CPACK_IFW_PACKAGE_FILE_EXTENSION
1707              New in version 3.10.
1708
1709
1710              The target binary extension.
1711
1712              On  Linux,  the  name  of the target binary is automatically ex‐
1713              tended with '.run', if you do not specify the extension.
1714
1715              On Windows, the target is created as an application with the ex‐
1716              tension '.exe', which is automatically added, if not supplied.
1717
1718              On  Mac, the target is created as an DMG disk image with the ex‐
1719              tension '.dmg', which is automatically added, if not supplied.
1720
1721       CPACK_IFW_REPOSITORIES_ALL
1722              The list of remote repositories.
1723
1724              The default value of this variable is computed by CPack and con‐
1725              tains  all repositories added with command cpack_ifw_add_reposi‐
1726              tory() or updated with command cpack_ifw_update_repository().
1727
1728       CPACK_IFW_DOWNLOAD_ALL
1729              If this is ON all components will be downloaded.  By default  is
1730              OFF or used value from CPACK_DOWNLOAD_ALL if set
1731
1732   Components
1733       CPACK_IFW_RESOLVE_DUPLICATE_NAMES
1734              Resolve duplicate names when installing components with groups.
1735
1736       CPACK_IFW_PACKAGES_DIRECTORIES
1737              Additional  prepared  packages dirs that will be used to resolve
1738              dependent components.
1739
1740       CPACK_IFW_REPOSITORIES_DIRECTORIES
1741              New in version 3.10.
1742
1743
1744              Additional prepared repository dirs that will be used to resolve
1745              and  repack  dependent  components.  This feature available only
1746              since QtIFW 3.1.
1747
1748   QtIFW Tools
1749       CPACK_IFW_FRAMEWORK_VERSION
1750              New in version 3.3.
1751
1752
1753              The version of used QtIFW tools.
1754
1755       The following variables provide the locations of the QtIFW command-line
1756       tools  as  discovered  by  the  module  CPackIFW.   These variables are
1757       cached, and may be configured if needed.
1758
1759       CPACK_IFW_ARCHIVEGEN_EXECUTABLE
1760              New in version 3.19.
1761
1762
1763              The path to archivegen.
1764
1765       CPACK_IFW_BINARYCREATOR_EXECUTABLE
1766              The path to binarycreator.
1767
1768       CPACK_IFW_REPOGEN_EXECUTABLE
1769              The path to repogen.
1770
1771       CPACK_IFW_INSTALLERBASE_EXECUTABLE
1772              The path to installerbase.
1773
1774       CPACK_IFW_DEVTOOL_EXECUTABLE
1775              The path to devtool.
1776
1777   Hints for Finding QtIFW
1778       Generally, the CPack IFW generator automatically finds QtIFW tools, but
1779       if  you  don't  use a default path for installation of the QtIFW tools,
1780       the path may be specified in either a CMake or an environment variable:
1781
1782       CPACK_IFW_ROOT
1783              New in version 3.9.
1784
1785
1786              An CMake variable which specifies the location of the QtIFW tool
1787              suite.
1788
1789              The  variable  will  be cached in the CPackConfig.cmake file and
1790              used at CPack runtime.
1791
1792       QTIFWDIR
1793              An environment variable which  specifies  the  location  of  the
1794              QtIFW tool suite.
1795
1796       NOTE:
1797          The specified path should not contain "bin" at the end (for example:
1798          "D:\DevTools\QtIFW2.0.5").
1799
1800       The CPACK_IFW_ROOT variable has a higher  priority  and  overrides  the
1801       value of the QTIFWDIR variable.
1802
1803   Other Settings
1804   Online installer
1805       By  default,  this generator generates an offline installer. This means
1806       that that all packaged files are fully contained in the installer  exe‐
1807       cutable.
1808
1809       In  contrast,  an online installer will download some or all components
1810       from a remote server.
1811
1812       The DOWNLOADED option in the  cpack_add_component()  command  specifies
1813       that  a component is to be downloaded. Alternatively, the ALL option in
1814       the cpack_configure_downloads() command specifies that  all  components
1815       are to be be downloaded.
1816
1817       The  cpack_ifw_add_repository()  command and the CPACK_IFW_DOWNLOAD_ALL
1818       variable allow for more specific configuration.
1819
1820       When there are online components, CPack  will  write  them  to  archive
1821       files.  The help page of the CPackComponent module, especially the sec‐
1822       tion on the cpack_configure_downloads() function, explains how to  make
1823       these files accessible from a download URL.
1824
1825   Internationalization
1826       New in version 3.9.
1827
1828
1829       Some  variables  and command arguments support internationalization via
1830       CMake script. This is an optional feature.
1831
1832       Installers created by QtIFW tools have built-in  support  for  interna‐
1833       tionalization  and  many  phrases  are localized to many languages, but
1834       this does not apply to the  description  of  the  your  components  and
1835       groups that will be distributed.
1836
1837       Localization of the description of your components and groups is useful
1838       for users of your installers.
1839
1840       A localized variable or argument can contain a  single  default  value,
1841       and a set of pairs the name of the locale and the localized value.
1842
1843       For example:
1844
1845          set(LOCALIZABLE_VARIABLE "Default value"
1846            en "English value"
1847            en_US "American value"
1848            en_GB "Great Britain value"
1849            )
1850
1851   See Also
1852       Qt Installer Framework Manual:
1853
1854       • Index page: http://doc.qt.io/qtinstallerframework/index.html
1855
1856       • Component                                                  Scripting:
1857         http://doc.qt.io/qtinstallerframework/scripting.html
1858
1859       • Predefined                                                 Variables:
1860         http://doc.qt.io/qtinstallerframework/scripting.html#predefined-variables
1861
1862       • Promoting                                                    Updates:
1863         http://doc.qt.io/qtinstallerframework/ifw-updates.html
1864
1865       Download Qt Installer Framework for your platform from Qt site:
1866              http://download.qt.io/official_releases/qt-installer-framework
1867
1868   CPack NSIS Generator
1869       CPack  Nullsoft Scriptable Install System (NSIS) generator specific op‐
1870       tions.
1871
1872       Changed in version 3.17: The NSIS generator requires NSIS 3.0 or newer.
1873
1874
1875   Variables specific to CPack NSIS generator
1876       The following variables are specific to the graphical installers  built
1877       on Windows Nullsoft Scriptable Install System.
1878
1879       CPACK_NSIS_INSTALL_ROOT
1880              The  default installation directory presented to the end user by
1881              the NSIS installer is under this root dir.  The  full  directory
1882              presented    to    the    end    user    is:    ${CPACK_NSIS_IN‐
1883              STALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY}
1884
1885       CPACK_NSIS_MUI_ICON
1886              An icon filename.  The name of a *.ico file  used  as  the  main
1887              icon for the generated install program.
1888
1889       CPACK_NSIS_MUI_UNIICON
1890              An  icon  filename.   The  name of a *.ico file used as the main
1891              icon for the generated uninstall program.
1892
1893       CPACK_NSIS_INSTALLER_MUI_ICON_CODE
1894              undocumented.
1895
1896       CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP
1897              New in version 3.5.
1898
1899
1900              The filename of a bitmap to use as the  NSIS  MUI_WELCOMEFINISH‐
1901              PAGE_BITMAP.
1902
1903       CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP
1904              New in version 3.5.
1905
1906
1907              The filename of a bitmap to use as the NSIS MUI_UNWELCOMEFINISH‐
1908              PAGE_BITMAP.
1909
1910       CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS
1911              Extra NSIS commands that will be added to the beginning  of  the
1912              install  Section,  before  your install tree is available on the
1913              target system.
1914
1915       CPACK_NSIS_EXTRA_INSTALL_COMMANDS
1916              Extra NSIS commands that will be added to the end of the install
1917              Section, after your install tree is available on the target sys‐
1918              tem.
1919
1920       CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
1921              Extra NSIS commands that will be added to the uninstall Section,
1922              before your install tree is removed from the target system.
1923
1924       CPACK_NSIS_COMPRESSOR
1925              The arguments that will be passed to the NSIS SetCompressor com‐
1926              mand.
1927
1928       CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL
1929              Ask about uninstalling previous versions first.  If this is  set
1930              to  ON,  then an installer will look for previous installed ver‐
1931              sions and if one is found, ask the user whether to uninstall  it
1932              before proceeding with the install.
1933
1934       CPACK_NSIS_MODIFY_PATH
1935              Modify  PATH  toggle.   If this is set to ON, then an extra page
1936              will appear in the installer that will allow the user to  choose
1937              whether the program directory should be added to the system PATH
1938              variable.
1939
1940       CPACK_NSIS_DISPLAY_NAME
1941              The display name string that appears in the Windows Apps &  fea‐
1942              tures in Control Panel
1943
1944       CPACK_NSIS_PACKAGE_NAME
1945              The title displayed at the top of the installer.
1946
1947       CPACK_NSIS_INSTALLED_ICON_NAME
1948              A path to the executable that contains the installer icon.
1949
1950       CPACK_NSIS_HELP_LINK
1951              URL to a web site providing assistance in installing your appli‐
1952              cation.
1953
1954       CPACK_NSIS_URL_INFO_ABOUT
1955              URL to a web site providing more information about your applica‐
1956              tion.
1957
1958       CPACK_NSIS_CONTACT
1959              Contact information for questions and comments about the instal‐
1960              lation process.
1961
1962       CPACK_NSIS_<compName>_INSTALL_DIRECTORY
1963              New in version 3.7.
1964
1965
1966              Custom install directory for the specified component  <compName>
1967              instead of $INSTDIR.
1968
1969       CPACK_NSIS_CREATE_ICONS_EXTRA
1970              Additional NSIS commands for creating Start Menu shortcuts.
1971
1972       CPACK_NSIS_DELETE_ICONS_EXTRA
1973              Additional NSIS commands to uninstall Start Menu shortcuts.
1974
1975       CPACK_NSIS_EXECUTABLES_DIRECTORY
1976              Creating  NSIS Start Menu links assumes that they are in bin un‐
1977              less this variable is set.  For example, you would set  this  to
1978              exec if your executables are in an exec directory.
1979
1980       CPACK_NSIS_MUI_FINISHPAGE_RUN
1981              Specify an executable to add an option to run on the finish page
1982              of the NSIS installer.
1983
1984       CPACK_NSIS_MENU_LINKS
1985              Specify links in [application] menu.  This should contain a list
1986              of pair link link name. The link may be a URL or a path relative
1987              to installation prefix.  Like:
1988
1989                 set(CPACK_NSIS_MENU_LINKS
1990                     "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake.html"
1991                     "CMake Help" "https://cmake.org" "CMake Web Site")
1992
1993       CPACK_NSIS_UNINSTALL_NAME
1994              New in version 3.17.
1995
1996
1997              Specify the name of the program to uninstall the  version.   De‐
1998              fault is Uninstall.
1999
2000       CPACK_NSIS_WELCOME_TITLE
2001              New in version 3.17.
2002
2003
2004              The  title  to  display  on  the top of the page for the welcome
2005              page.
2006
2007       CPACK_NSIS_WELCOME_TITLE_3LINES
2008              New in version 3.17.
2009
2010
2011              Display the title in the welcome page on 3 lines instead of 2.
2012
2013       CPACK_NSIS_FINISH_TITLE
2014              New in version 3.17.
2015
2016
2017              The title to display on the top of the page for the finish page.
2018
2019       CPACK_NSIS_FINISH_TITLE_3LINES
2020              New in version 3.17.
2021
2022
2023              Display the title in the finish page on 3 lines instead of 2.
2024
2025       CPACK_NSIS_MUI_HEADERIMAGE
2026              New in version 3.17.
2027
2028
2029              The image to display on the header of installers pages.
2030
2031       CPACK_NSIS_MANIFEST_DPI_AWARE
2032              New in version 3.18.
2033
2034
2035              If set, declares that the installer is DPI-aware.
2036
2037       CPACK_NSIS_BRANDING_TEXT
2038              New in version 3.20.
2039
2040
2041              If set, updates the text at the bottom of  the  install  window.
2042              To set the string to blank, use a space (" ").
2043
2044       CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION
2045              New in version 3.20.
2046
2047
2048              If  set,  trim  down  the size of the control to the size of the
2049              branding text string.  Allowed  values  for  this  variable  are
2050              LEFT,  CENTER  or RIGHT.  If not specified, the default behavior
2051              is LEFT.
2052
2053   CPack NuGet Generator
2054       New in version 3.12.
2055
2056
2057       When build a NuGet package there is no direct way to control an  output
2058       filename  due a lack of the corresponding CLI option of NuGet, so there
2059       is no CPACK_NUGET_PACKAGE_FILE_NAME variable. To form the output  file‐
2060       name  NuGet  uses  the  package  name  and the version according to its
2061       built-in rules.
2062
2063       Also,  be  aware  that  including  a  top  level  directory  (CPACK_IN‐
2064       CLUDE_TOPLEVEL_DIRECTORY) is ignored by this generator.
2065
2066   Variables specific to CPack NuGet generator
2067       The  CPack  NuGet  generator may be used to create NuGet packages using
2068       CPack. The CPack NuGet generator is a CPack generator thus it uses  the
2069       CPACK_XXX variables used by CPack.
2070
2071       The CPack NuGet generator has specific features which are controlled by
2072       the specifics CPACK_NUGET_XXX variables. In the "one  per  group"  mode
2073       (see  CPACK_COMPONENTS_GROUPING),  <compName>  placeholder in the vari‐
2074       ables below would contain a group name (uppercased and  turned  into  a
2075       "C" identifier).
2076
2077       List of CPack NuGet generator specific variables:
2078
2079       CPACK_NUGET_COMPONENT_INSTALL
2080              Enable component packaging for CPack NuGet generator
2081
2082              • Mandatory : NO
2083
2084              • Default   : OFF
2085
2086       CPACK_NUGET_PACKAGE_NAME
2087
2088       CPACK_NUGET_<compName>_PACKAGE_NAME
2089              The  NUGET package name. CPACK_NUGET_PACKAGE_NAME is used as the
2090              package id on nuget.org
2091
2092              • Mandatory : YES
2093
2094              • Default   : CPACK_PACKAGE_NAME
2095
2096       CPACK_NUGET_PACKAGE_VERSION
2097
2098       CPACK_NUGET_<compName>_PACKAGE_VERSION
2099              The NuGet package version.
2100
2101              • Mandatory : YES
2102
2103              • Default   : CPACK_PACKAGE_VERSION
2104
2105       CPACK_NUGET_PACKAGE_DESCRIPTION
2106
2107       CPACK_NUGET_<compName>_PACKAGE_DESCRIPTION
2108              A long description of the package for UI display.
2109
2110              • Mandatory : YES
2111
2112
2113
2114                Default :
2115
2116CPACK_COMPONENT_<compName>_DESCRIPTION,
2117
2118CPACK_COMPONENT_GROUP_<groupName>_DESCRIPTION,
2119
2120CPACK_PACKAGE_DESCRIPTION
2121
2122       CPACK_NUGET_PACKAGE_AUTHORS
2123
2124       CPACK_NUGET_<compName>_PACKAGE_AUTHORS
2125              A comma-separated list of packages authors, matching the profile
2126              names  on nuget.org. These are displayed in the NuGet Gallery on
2127              nuget.org and are used to cross-reference packages by  the  same
2128              authors.
2129
2130              • Mandatory : YES
2131
2132              • Default   : CPACK_PACKAGE_VENDOR
2133
2134       CPACK_NUGET_PACKAGE_TITLE
2135
2136       CPACK_NUGET_<compName>_PACKAGE_TITLE
2137              A human-friendly title of the package, typically used in UI dis‐
2138              plays as on nuget.org and the Package Manager in Visual  Studio.
2139              If not specified, the package ID is used.
2140
2141              • Mandatory : NO
2142
2143
2144
2145                Default :
2146
2147CPACK_COMPONENT_<compName>_DISPLAY_NAME,
2148
2149CPACK_COMPONENT_GROUP_<groupName>_DISPLAY_NAME
2150
2151       CPACK_NUGET_PACKAGE_OWNERS
2152
2153       CPACK_NUGET_<compName>_PACKAGE_OWNERS
2154              A  comma-separated  list  of  the package creators using profile
2155              names on nuget.org. This is often the same list as  in  authors,
2156              and is ignored when uploading the package to nuget.org.
2157
2158              • Mandatory : NO
2159
2160              • Default   : -
2161
2162       CPACK_NUGET_PACKAGE_HOMEPAGE_URL
2163
2164       CPACK_NUGET_<compName>_PACKAGE_HOMEPAGE_URL
2165              An  URL  for the package's home page, often shown in UI displays
2166              as well as nuget.org.
2167
2168              • Mandatory : NO
2169
2170              • Default   : CPACK_PACKAGE_HOMEPAGE_URL
2171
2172       CPACK_NUGET_PACKAGE_LICENSEURL
2173
2174       CPACK_NUGET_<compName>_PACKAGE_LICENSEURL
2175              Deprecated since version 3.20:  Use  a  local  license  file  (‐
2176              CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME) or a (SPDX) license iden‐
2177              tifier (CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION) instead.
2178
2179
2180              An URL for the package's license, often shown in UI displays  as
2181              well as on nuget.org.
2182
2183              • Mandatory : NO
2184
2185              • Default   : -
2186
2187       CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION
2188
2189       CPACK_NUGET_<compName>_PACKAGE_LICENSE_EXPRESSION
2190              New in version 3.20.
2191
2192
2193              A  Software Package Data Exchange (SPDX) license identifier such
2194              as MIT, BSD-3-Clause, or LGPL-3.0-or-later. In  the  case  of  a
2195              choice  of  licenses  or more complex restrictions, compound li‐
2196              cense expressions may be formed using boolean operators, for ex‐
2197              ample MIT OR BSD-3-Clause.  See the SPDX specification for guid‐
2198              ance on forming complex license expressions.
2199
2200              If    CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME    is     specified,
2201              CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION is ignored.
2202
2203              • Mandatory : NO
2204
2205              • Default   : -
2206
2207       CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME
2208
2209       CPACK_NUGET_<compName>_PACKAGE_LICENSE_FILE_NAME
2210              The package's license file in .txt or .md format.
2211
2212              If     CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME    is    specified,
2213              CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION is ignored.
2214
2215              New in version 3.20.
2216
2217
2218              • Mandatory : NO
2219
2220              • Default   : -
2221
2222       CPACK_NUGET_PACKAGE_ICONURL
2223
2224       CPACK_NUGET_<compName>_PACKAGE_ICONURL
2225              Deprecated  since  version  3.20:  Use  a  local  icon  file  (‐
2226              CPACK_NUGET_PACKAGE_ICON) instead.
2227
2228
2229              An  URL for a 64x64 image with transparency background to use as
2230              the icon for the package in UI display.
2231
2232              • Mandatory : NO
2233
2234              • Default   : -
2235
2236       CPACK_NUGET_PACKAGE_ICON
2237
2238       CPACK_NUGET_<compName>_PACKAGE_ICON
2239              New in version 3.20.
2240
2241
2242              The filename of a 64x64 image with  transparency  background  to
2243              use as the icon for the package in UI display.
2244
2245              • Mandatory : NO
2246
2247              • Default   : -
2248
2249       CPACK_NUGET_PACKAGE_DESCRIPTION_SUMMARY
2250
2251       CPACK_NUGET_<compName>_PACKAGE_DESCRIPTION_SUMMARY
2252              A short description of the package for UI display. If omitted, a
2253              truncated version of description is used.
2254
2255              • Mandatory : NO
2256
2257              • Default   : CPACK_PACKAGE_DESCRIPTION_SUMMARY
2258
2259       CPACK_NUGET_PACKAGE_RELEASE_NOTES
2260
2261       CPACK_NUGET_<compName>_PACKAGE_RELEASE_NOTES
2262              A description of the changes made in this release of  the  pack‐
2263              age,  often used in UI like the Updates tab of the Visual Studio
2264              Package Manager in place of the package description.
2265
2266              • Mandatory : NO
2267
2268              • Default   : -
2269
2270       CPACK_NUGET_PACKAGE_COPYRIGHT
2271
2272       CPACK_NUGET_<compName>_PACKAGE_COPYRIGHT
2273              Copyright details for the package.
2274
2275              • Mandatory : NO
2276
2277              • Default   : -
2278
2279       CPACK_NUGET_PACKAGE_LANGUAGE
2280
2281       CPACK_NUGET_<compName>_PACKAGE_LANGUAGE
2282              New in version 3.20.
2283
2284
2285              Locale specifier for the package, for example en_CA.
2286
2287              • Mandatory : NO
2288
2289              • Default   : -
2290
2291       CPACK_NUGET_PACKAGE_TAGS
2292
2293       CPACK_NUGET_<compName>_PACKAGE_TAGS
2294              A space-delimited list of tags and keywords  that  describe  the
2295              package  and  aid discoverability of packages through search and
2296              filtering.
2297
2298              • Mandatory : NO
2299
2300              • Default   : -
2301
2302       CPACK_NUGET_PACKAGE_DEPENDENCIES
2303
2304       CPACK_NUGET_<compName>_PACKAGE_DEPENDENCIES
2305              A list of package dependencies.
2306
2307              • Mandatory : NO
2308
2309              • Default   : -
2310
2311       CPACK_NUGET_PACKAGE_DEPENDENCIES_<dependency>_VERSION
2312
2313       CPACK_NUGET_<compName>_PACKAGE_DEPENDENCIES_<dependency>_VERSION
2314              A version specification for  the  particular  dependency,  where
2315              <dependency>  is  an  item  of  the  dependency list (see above)
2316              transformed with MAKE_C_IDENTIFIER function of string() command.
2317
2318              • Mandatory : NO
2319
2320              • Default   : -
2321
2322       CPACK_NUGET_PACKAGE_DEBUG
2323              Enable debug messages while executing CPack NuGet generator.
2324
2325              • Mandatory : NO
2326
2327              • Default   : OFF
2328
2329   CPack PackageMaker Generator
2330       PackageMaker CPack generator (macOS).
2331
2332       Deprecated since version 3.17: Xcode no longer distributes the Package‐
2333       Maker  tools.  This CPack generator will be removed in a future version
2334       of CPack.
2335
2336
2337   Variables specific to CPack PackageMaker generator
2338       The following variable is specific to installers built on Mac macOS us‐
2339       ing PackageMaker:
2340
2341       CPACK_OSX_PACKAGE_VERSION
2342              The  version  of  macOS  that the resulting PackageMaker archive
2343              should be compatible with. Different versions of  macOS  support
2344              different  features.  For  example,  CPack can only build compo‐
2345              nent-based installers for macOS 10.4  or  newer,  and  can  only
2346              build  installers  that download components on-the-fly for macOS
2347              10.5 or newer. If left blank, this value will be set to the min‐
2348              imum  version of macOS that supports the requested features. Set
2349              this variable to some value (e.g., 10.4) only  if  you  want  to
2350              guarantee  that  your  installer  will  work  on that version of
2351              macOS, and don't mind missing extra features  available  in  the
2352              installer shipping with later versions of macOS.
2353
2354   Background Image
2355       New in version 3.17.
2356
2357
2358       This  group of variables controls the background image of the generated
2359       installer.
2360
2361       CPACK_PACKAGEMAKER_BACKGROUND
2362              Adds a background to Distribution XML if  specified.  The  value
2363              contains the path to image in Resources directory.
2364
2365       CPACK_PACKAGEMAKER_BACKGROUND_ALIGNMENT
2366              Adds  an  alignment  attribute to the background in Distribution
2367              XML.  Refer to Apple documentation for valid values.
2368
2369       CPACK_PACKAGEMAKER_BACKGROUND_SCALING
2370              Adds a scaling attribute to the background in Distribution  XML.
2371              Refer to Apple documentation for valid values.
2372
2373       CPACK_PACKAGEMAKER_BACKGROUND_MIME_TYPE
2374              Adds  a  mime-type  attribute  to the background in Distribution
2375              XML.  The option contains MIME type of an image.
2376
2377       CPACK_PACKAGEMAKER_BACKGROUND_UTI
2378              Adds an uti attribute to the  background  in  Distribution  XML.
2379              The option contains UTI type of an image.
2380
2381       CPACK_PACKAGEMAKER_BACKGROUND_DARKAQUA
2382              Adds a background for the Dark Aqua theme to Distribution XML if
2383              specified. The value contains the path to image in Resources di‐
2384              rectory.
2385
2386       CPACK_PACKAGEMAKER_BACKGROUND_DARKAQUA_ALIGNMENT
2387              Does the same as CPACK_PACKAGEMAKER_BACKGROUND_ALIGNMENT option,
2388              but for the dark theme.
2389
2390       CPACK_PACKAGEMAKER_BACKGROUND_DARKAQUA_SCALING
2391              Does the same as  CPACK_PACKAGEMAKER_BACKGROUND_SCALING  option,
2392              but for the dark theme.
2393
2394       CPACK_PACKAGEMAKER_BACKGROUND_DARKAQUA_MIME_TYPE
2395              Does the same as CPACK_PACKAGEMAKER_BACKGROUND_MIME_TYPE option,
2396              but for the dark theme.
2397
2398       CPACK_PACKAGEMAKER_BACKGROUND_DARKAQUA_UTI
2399              Does the same as CPACK_PACKAGEMAKER_BACKGROUND_UTI  option,  but
2400              for the dark theme.
2401
2402   CPack productbuild Generator
2403       New in version 3.7.
2404
2405
2406       productbuild CPack generator (macOS).
2407
2408   Variables specific to CPack productbuild generator
2409       The following variable is specific to installers built on Mac macOS us‐
2410       ing ProductBuild:
2411
2412       CPACK_COMMAND_PRODUCTBUILD
2413              Path to the productbuild(1) command used to generate  a  product
2414              archive for the macOS Installer or Mac App Store.  This variable
2415              can be used to override the automatically detected  command  (or
2416              specify its location if the auto-detection fails to find it).
2417
2418       CPACK_PRODUCTBUILD_IDENTITY_NAME
2419              New in version 3.8.
2420
2421
2422              Adds a digital signature to the resulting package.
2423
2424       CPACK_PRODUCTBUILD_KEYCHAIN_PATH
2425              New in version 3.8.
2426
2427
2428              Specify a specific keychain to search for the signing identity.
2429
2430       CPACK_COMMAND_PKGBUILD
2431              Path to the pkgbuild(1) command used to generate an macOS compo‐
2432              nent package on macOS.  This variable can be  used  to  override
2433              the  automatically  detected command (or specify its location if
2434              the auto-detection fails to find it).
2435
2436       CPACK_PKGBUILD_IDENTITY_NAME
2437              New in version 3.8.
2438
2439
2440              Adds a digital signature to the resulting package.
2441
2442       CPACK_PKGBUILD_KEYCHAIN_PATH
2443              New in version 3.8.
2444
2445
2446              Specify a specific keychain to search for the signing identity.
2447
2448       CPACK_PREFLIGHT_<COMP>_SCRIPT
2449              Full path to a file that will be used as the  preinstall  script
2450              for  the  named  <COMP> component's package, where <COMP> is the
2451              uppercased component name.  No preinstall  script  is  added  if
2452              this variable is not defined for a given component.
2453
2454       CPACK_POSTFLIGHT_<COMP>_SCRIPT
2455              Full  path to a file that will be used as the postinstall script
2456              for the named <COMP> component's package, where  <COMP>  is  the
2457              uppercased  component  name.   No postinstall script is added if
2458              this variable is not defined for a given component.
2459
2460       CPACK_PRODUCTBUILD_RESOURCES_DIR
2461              New in version 3.9.
2462
2463
2464              If specified the productbuild generator copies files  from  this
2465              directory (including subdirectories) to the Resources directory.
2466              This is done before the  CPACK_RESOURCE_FILE_WELCOME,  CPACK_RE‐
2467              SOURCE_FILE_README,  and  CPACK_RESOURCE_FILE_LICENSE  files are
2468              copied.
2469
2470   Background Image
2471       New in version 3.17.
2472
2473
2474       This group of variables controls the background image of the  generated
2475       installer.
2476
2477       CPACK_PRODUCTBUILD_BACKGROUND
2478              Adds  a  background  to Distribution XML if specified. The value
2479              contains the path to image in Resources directory.
2480
2481       CPACK_PRODUCTBUILD_BACKGROUND_ALIGNMENT
2482              Adds an alignment attribute to the  background  in  Distribution
2483              XML.  Refer to Apple documentation for valid values.
2484
2485       CPACK_PRODUCTBUILD_BACKGROUND_SCALING
2486              Adds  a scaling attribute to the background in Distribution XML.
2487              Refer to Apple documentation for valid values.
2488
2489       CPACK_PRODUCTBUILD_BACKGROUND_MIME_TYPE
2490              Adds a mime-type attribute to  the  background  in  Distribution
2491              XML.  The option contains MIME type of an image.
2492
2493       CPACK_PRODUCTBUILD_BACKGROUND_UTI
2494              Adds  an  uti  attribute  to the background in Distribution XML.
2495              The option contains UTI type of an image.
2496
2497       CPACK_PRODUCTBUILD_BACKGROUND_DARKAQUA
2498              Adds a background for the Dark Aqua theme to Distribution XML if
2499              specified. The value contains the path to image in Resources di‐
2500              rectory.
2501
2502       CPACK_PRODUCTBUILD_BACKGROUND_DARKAQUA_ALIGNMENT
2503              Does the same as CPACK_PRODUCTBUILD_BACKGROUND_ALIGNMENT option,
2504              but for the dark theme.
2505
2506       CPACK_PRODUCTBUILD_BACKGROUND_DARKAQUA_SCALING
2507              Does  the  same as CPACK_PRODUCTBUILD_BACKGROUND_SCALING option,
2508              but for the dark theme.
2509
2510       CPACK_PRODUCTBUILD_BACKGROUND_DARKAQUA_MIME_TYPE
2511              Does the same as CPACK_PRODUCTBUILD_BACKGROUND_MIME_TYPE option,
2512              but for the dark theme.
2513
2514       CPACK_PRODUCTBUILD_BACKGROUND_DARKAQUA_UTI
2515              Does  the  same as CPACK_PRODUCTBUILD_BACKGROUND_UTI option, but
2516              for the dark theme.
2517
2518   CPack RPM Generator
2519       The built in (binary) CPack RPM generator (Unix only)
2520
2521   Variables specific to CPack RPM generator
2522       The CPack RPM generator may be used to create RPM packages using CPack.
2523       The CPack RPM generator is a CPack generator thus it uses the CPACK_XXX
2524       variables used by CPack.
2525
2526       The CPack RPM generator has specific features which are  controlled  by
2527       the specifics CPACK_RPM_XXX variables.
2528
2529       CPACK_RPM_<COMPONENT>_XXXX  variables may be used in order to have com‐
2530       ponent specific values.  Note however that <COMPONENT>  refers  to  the
2531       grouping  name written in upper case. It may be either a component name
2532       or a component GROUP name. Usually those variables  correspond  to  RPM
2533       spec  file  entities.  One  may  find information about spec files here
2534       http://www.rpm.org/wiki/Docs
2535
2536       Changed in version 3.6: <COMPONENT> part of variables is  preferred  to
2537       be   in   upper   case  (e.g.  if  component  is  named  foo  then  use
2538       CPACK_RPM_FOO_XXXX variable name format) as is with other CPACK_<COMPO‐
2539       NENT>_XXXX   variables.    For   the  purposes  of  back  compatibility
2540       (CMake/CPack version 3.5 and lower) support for  same  cased  component
2541       (e.g.  fOo  would be used as CPACK_RPM_fOo_XXXX) is still supported for
2542       variables defined in older versions of CMake/CPack but is  not  guaran‐
2543       teed  for  variables  that will be added in the future. For the sake of
2544       back compatibility same cased component variables also  override  upper
2545       cased versions where both are present.
2546
2547
2548       Here are some CPack RPM generator wiki resources that are here for his‐
2549       toric reasons and are no longer maintained but may still prove useful:
2550
2551https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/Configuration
2552
2553https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/PackageGenerators#rpm-unix-only
2554
2555       List of CPack RPM generator specific variables:
2556
2557       CPACK_RPM_COMPONENT_INSTALL
2558              Enable component packaging for CPack RPM generator
2559
2560              • Mandatory : NO
2561
2562              • Default   : OFF
2563
2564              If enabled (ON) multiple packages are generated.  By  default  a
2565              single package containing files of all components is generated.
2566
2567       CPACK_RPM_PACKAGE_SUMMARY
2568
2569       CPACK_RPM_<component>_PACKAGE_SUMMARY
2570              The RPM package summary.
2571
2572              • Mandatory : YES
2573
2574              • Default   : CPACK_PACKAGE_DESCRIPTION_SUMMARY
2575
2576              New  in  version  3.2: Per-component CPACK_RPM_<component>_PACK‐
2577              AGE_SUMMARY variables.
2578
2579
2580       CPACK_RPM_PACKAGE_NAME
2581
2582       CPACK_RPM_<component>_PACKAGE_NAME
2583              The RPM package name.
2584
2585              • Mandatory : YES
2586
2587              • Default   : CPACK_PACKAGE_NAME
2588
2589              New in version  3.5:  Per-component  CPACK_RPM_<component>_PACK‐
2590              AGE_NAME variables.
2591
2592
2593       CPACK_RPM_FILE_NAME
2594
2595       CPACK_RPM_<component>_FILE_NAME
2596              New in version 3.6.
2597
2598
2599              Package file name.
2600
2601              • Mandatory : YES
2602
2603
2604
2605                Default
2606                       <CPACK_PACKAGE_FILE_NAME>[-<component>].rpm with spaces
2607                       replaced by '-'
2608
2609              This may be set to RPM-DEFAULT to allow rpmbuild tool to  gener‐
2610              ate package file name by itself.  Alternatively provided package
2611              file name must end with .rpm suffix.
2612
2613              NOTE:
2614                 By using user provided spec file, rpm macro  extensions  such
2615                 as  for generating debuginfo packages or by simply using mul‐
2616                 tiple components more than one rpm file may be generated, ei‐
2617                 ther  from  a  single  spec  file or from multiple spec files
2618                 (each component execution produces its own  spec  file).   In
2619                 such cases duplicate file names may occur as a result of this
2620                 variable setting or spec file  content  structure.  Duplicate
2621                 files get overwritten and it is up to the packager to set the
2622                 variables in a manner that will prevent such errors.
2623
2624       CPACK_RPM_MAIN_COMPONENT
2625              New in version 3.8.
2626
2627
2628              Main component that is packaged without component suffix.
2629
2630              • Mandatory : NO
2631
2632              • Default   : -
2633
2634              This variable can be set to any component or group name so  that
2635              component  or  group  rpm package is generated without component
2636              suffix in filename and package name.
2637
2638       CPACK_RPM_PACKAGE_EPOCH
2639              New in version 3.10.
2640
2641
2642              The RPM package epoch
2643
2644              • Mandatory : No
2645
2646              • Default   : -
2647
2648              Optional number that should be incremented  when  changing  ver‐
2649              sioning  schemas  or  fixing  mistakes in the version numbers of
2650              older packages.
2651
2652       CPACK_RPM_PACKAGE_VERSION
2653              The RPM package version.
2654
2655              • Mandatory : YES
2656
2657              • Default   : CPACK_PACKAGE_VERSION
2658
2659       CPACK_RPM_PACKAGE_ARCHITECTURE
2660
2661       CPACK_RPM_<component>_PACKAGE_ARCHITECTURE
2662              The RPM package architecture.
2663
2664              • Mandatory : YES
2665
2666              • Default   : Native architecture output by uname -m
2667
2668              This may be set to noarch if you know you are building a  noarch
2669              package.
2670
2671              New  in  version  3.3: Per-component CPACK_RPM_<component>_PACK‐
2672              AGE_ARCHITECTURE variables.
2673
2674
2675       CPACK_RPM_PACKAGE_RELEASE
2676              The RPM package release.
2677
2678              • Mandatory : YES
2679
2680              • Default   : 1
2681
2682              This is the numbering of the RPM package itself, i.e.  the  ver‐
2683              sion  of  the  packaging and not the version of the content (see
2684              CPACK_RPM_PACKAGE_VERSION). One may change the default value  if
2685              the  previous  packaging was buggy and/or you want to put here a
2686              fancy Linux distro specific numbering.
2687
2688       NOTE:
2689          This is the string that goes into the RPM Release: field. Some  dis‐
2690          tros  (e.g.  Fedora, CentOS) require 1%{?dist} format and not just a
2691          number.     %{?dist}    part    can    be    added    by     setting
2692          CPACK_RPM_PACKAGE_RELEASE_DIST.
2693
2694       CPACK_RPM_PACKAGE_RELEASE_DIST
2695              New in version 3.6.
2696
2697
2698              The dist tag that is added  RPM Release: field.
2699
2700              • Mandatory : NO
2701
2702              • Default   : OFF
2703
2704              This  is  the reported %{dist} tag from the current distribution
2705              or empty %{dist} if RPM macro is not set. If  this  variable  is
2706              set  then  RPM  Release: field value is set to ${CPACK_RPM_PACK‐
2707              AGE_RELEASE}%{?dist}.
2708
2709       CPACK_RPM_PACKAGE_LICENSE
2710              The RPM package license policy.
2711
2712              • Mandatory : YES
2713
2714              • Default   : "unknown"
2715
2716       CPACK_RPM_PACKAGE_GROUP
2717
2718       CPACK_RPM_<component>_PACKAGE_GROUP
2719              The RPM package group.
2720
2721              • Mandatory : YES
2722
2723              • Default   : "unknown"
2724
2725              New in version  3.5:  Per-component  CPACK_RPM_<component>_PACK‐
2726              AGE_GROUP variables.
2727
2728
2729       CPACK_RPM_PACKAGE_VENDOR
2730              The RPM package vendor.
2731
2732              • Mandatory : YES
2733
2734              • Default   : CPACK_PACKAGE_VENDOR if set or "unknown"
2735
2736       CPACK_RPM_PACKAGE_URL
2737
2738       CPACK_RPM_<component>_PACKAGE_URL
2739              The projects URL.
2740
2741              • Mandatory : NO
2742
2743              • Default   : CMAKE_PROJECT_HOMEPAGE_URL
2744
2745              New in version 3.12: The CMAKE_PROJECT_HOMEPAGE_URL variable.
2746
2747
2748       CPACK_RPM_PACKAGE_DESCRIPTION
2749
2750       CPACK_RPM_<component>_PACKAGE_DESCRIPTION
2751              RPM package description.
2752
2753              • Mandatory : YES
2754
2755              • Default  :  CPACK_COMPONENT_<compName>_DESCRIPTION  (component
2756                based installers only) if set,  CPACK_PACKAGE_DESCRIPTION_FILE
2757                if set or "no package description available"
2758
2759              New  in  version  3.2: Per-component CPACK_RPM_<component>_PACK‐
2760              AGE_DESCRIPTION variables.
2761
2762
2763       CPACK_RPM_COMPRESSION_TYPE
2764              RPM compression type.
2765
2766              • Mandatory : NO
2767
2768              • Default   : -
2769
2770              May be used to override RPM compression type to be used to build
2771              the RPM. For example some Linux distribution now default to lzma
2772              or xz compression whereas older cannot use such RPM. Using  this
2773              one can enforce compression type to be used.
2774
2775              Possible values are:
2776
2777              • lzma
2778
2779              • xz
2780
2781              • bzip2
2782
2783              • gzip
2784
2785       CPACK_RPM_PACKAGE_AUTOREQ
2786
2787       CPACK_RPM_<component>_PACKAGE_AUTOREQ
2788              RPM spec autoreq field.
2789
2790              • Mandatory : NO
2791
2792              • Default   : -
2793
2794              May  be  used  to  enable  (1, yes) or disable (0, no) automatic
2795              shared libraries dependency detection. Dependencies are added to
2796              requires list.
2797
2798              NOTE:
2799                 By  default  automatic dependency detection is enabled by rpm
2800                 generator.
2801
2802       CPACK_RPM_PACKAGE_AUTOPROV
2803
2804       CPACK_RPM_<component>_PACKAGE_AUTOPROV
2805              RPM spec autoprov field.
2806
2807              • Mandatory : NO
2808
2809              • Default   : -
2810
2811              May be used to enable (1, yes)  or  disable  (0,  no)  automatic
2812              listing  of  shared  libraries that are provided by the package.
2813              Shared libraries are added to provides list.
2814
2815              NOTE:
2816                 By default automatic provides detection  is  enabled  by  rpm
2817                 generator.
2818
2819       CPACK_RPM_PACKAGE_AUTOREQPROV
2820
2821       CPACK_RPM_<component>_PACKAGE_AUTOREQPROV
2822              RPM spec autoreqprov field.
2823
2824              • Mandatory : NO
2825
2826              • Default   : -
2827
2828              Variable enables/disables autoreq and autoprov at the same time.
2829              See CPACK_RPM_PACKAGE_AUTOREQ and CPACK_RPM_PACKAGE_AUTOPROV for
2830              more details.
2831
2832              NOTE:
2833                 By default automatic detection feature is enabled by rpm.
2834
2835       CPACK_RPM_PACKAGE_REQUIRES
2836
2837       CPACK_RPM_<component>_PACKAGE_REQUIRES
2838              RPM spec requires field.
2839
2840              • Mandatory : NO
2841
2842              • Default   : -
2843
2844              May  be  used  to set RPM dependencies (requires). Note that you
2845              must enclose the complete requires string  between  quotes,  for
2846              example:
2847
2848                 set(CPACK_RPM_PACKAGE_REQUIRES "python >= 2.5.0, cmake >= 2.8")
2849
2850              The required package list of an RPM file could be printed with:
2851
2852                 rpm -qp --requires file.rpm
2853
2854       CPACK_RPM_PACKAGE_CONFLICTS
2855
2856       CPACK_RPM_<component>_PACKAGE_CONFLICTS
2857              RPM spec conflicts field.
2858
2859              • Mandatory : NO
2860
2861              • Default   : -
2862
2863              May  be  used to set negative RPM dependencies (conflicts). Note
2864              that you must  enclose  the  complete  requires  string  between
2865              quotes, for example:
2866
2867                 set(CPACK_RPM_PACKAGE_CONFLICTS "libxml2")
2868
2869              The  conflicting  package  list  of an RPM file could be printed
2870              with:
2871
2872                 rpm -qp --conflicts file.rpm
2873
2874       CPACK_RPM_PACKAGE_REQUIRES_PRE
2875
2876       CPACK_RPM_<component>_PACKAGE_REQUIRES_PRE
2877              New in version 3.2.
2878
2879
2880              RPM spec requires(pre) field.
2881
2882              • Mandatory : NO
2883
2884              • Default   : -
2885
2886              May be used to set RPM preinstall dependencies  (requires(pre)).
2887              Note  that you must enclose the complete requires string between
2888              quotes, for example:
2889
2890                 set(CPACK_RPM_PACKAGE_REQUIRES_PRE "shadow-utils, initscripts")
2891
2892       CPACK_RPM_PACKAGE_REQUIRES_POST
2893
2894       CPACK_RPM_<component>_PACKAGE_REQUIRES_POST
2895              New in version 3.2.
2896
2897
2898              RPM spec requires(post) field.
2899
2900              • Mandatory : NO
2901
2902              • Default   : -
2903
2904              May  be  used  to  set   RPM   postinstall   dependencies   (re‐
2905              quires(post)).  Note that you must enclose the complete requires
2906              string between quotes, for example:
2907
2908                 set(CPACK_RPM_PACKAGE_REQUIRES_POST "shadow-utils, initscripts")
2909
2910       CPACK_RPM_PACKAGE_REQUIRES_POSTUN
2911
2912       CPACK_RPM_<component>_PACKAGE_REQUIRES_POSTUN
2913              New in version 3.2.
2914
2915
2916              RPM spec requires(postun) field.
2917
2918              • Mandatory : NO
2919
2920              • Default   : -
2921
2922              May be used to set RPM postuninstall dependencies (requires(pos‐
2923              tun)).  Note  that you must enclose the complete requires string
2924              between quotes, for example:
2925
2926                 set(CPACK_RPM_PACKAGE_REQUIRES_POSTUN "shadow-utils, initscripts")
2927
2928       CPACK_RPM_PACKAGE_REQUIRES_PREUN
2929
2930       CPACK_RPM_<component>_PACKAGE_REQUIRES_PREUN
2931              New in version 3.2.
2932
2933
2934              RPM spec requires(preun) field.
2935
2936              • Mandatory : NO
2937
2938              • Default   : -
2939
2940              May  be  used  to  set  RPM   preuninstall   dependencies   (re‐
2941              quires(preun)). Note that you must enclose the complete requires
2942              string between quotes, for example:
2943
2944                 set(CPACK_RPM_PACKAGE_REQUIRES_PREUN "shadow-utils, initscripts")
2945
2946       CPACK_RPM_PACKAGE_SUGGESTS
2947
2948       CPACK_RPM_<component>_PACKAGE_SUGGESTS
2949              RPM spec suggest field.
2950
2951              • Mandatory : NO
2952
2953              • Default   : -
2954
2955              May be used to set weak RPM dependencies (suggests).  Note  that
2956              you must enclose the complete requires string between quotes.
2957
2958       CPACK_RPM_PACKAGE_PROVIDES
2959
2960       CPACK_RPM_<component>_PACKAGE_PROVIDES
2961              RPM spec provides field.
2962
2963              • Mandatory : NO
2964
2965              • Default   : -
2966
2967              May  be  used  to  set RPM dependencies (provides). The provided
2968              package list of an RPM file could be printed with:
2969
2970                 rpm -qp --provides file.rpm
2971
2972       CPACK_RPM_PACKAGE_OBSOLETES
2973
2974       CPACK_RPM_<component>_PACKAGE_OBSOLETES
2975              RPM spec obsoletes field.
2976
2977              • Mandatory : NO
2978
2979              • Default   : -
2980
2981              May be used to set RPM packages that are obsoleted by this one.
2982
2983       CPACK_RPM_PACKAGE_RELOCATABLE
2984              build a relocatable RPM.
2985
2986              • Mandatory : NO
2987
2988              • Default   : CPACK_PACKAGE_RELOCATABLE
2989
2990              If this variable is set to TRUE or ON, the CPack  RPM  generator
2991              will  try  to build a relocatable RPM package. A relocatable RPM
2992              may be installed using:
2993
2994                 rpm --prefix or --relocate
2995
2996              in order to install it at an alternate place  see  rpm(8).  Note
2997              that  currently this may fail if CPACK_SET_DESTDIR is set to ON.
2998              If CPACK_SET_DESTDIR is set then you will get a warning  message
2999              but if there is file installed with absolute path you'll get un‐
3000              expected behavior.
3001
3002       CPACK_RPM_SPEC_INSTALL_POST
3003              Deprecated - use CPACK_RPM_SPEC_MORE_DEFINE instead.
3004
3005              • Mandatory : NO
3006
3007              • Default   : -
3008
3009              • Deprecated: YES
3010
3011              May be used to override the __spec_install_post  section  within
3012              the  generated  spec file.  This affects the install step during
3013              package creation, not during package installation.   For  adding
3014              operations  to  be  performed  during  package installation, use
3015              CPACK_RPM_POST_INSTALL_SCRIPT_FILE instead.
3016
3017       CPACK_RPM_SPEC_MORE_DEFINE
3018              RPM extended spec definitions lines.
3019
3020              • Mandatory : NO
3021
3022              • Default   : -
3023
3024              May be used to add any %define lines to the generated spec file.
3025              An  example  of  its  use is to prevent stripping of executables
3026              (but note that this may also disable other default post  install
3027              processing):
3028
3029                 set(CPACK_RPM_SPEC_MORE_DEFINE "%define __spec_install_post /bin/true")
3030
3031       CPACK_RPM_PACKAGE_DEBUG
3032              Toggle CPack RPM generator debug output.
3033
3034              • Mandatory : NO
3035
3036              • Default   : -
3037
3038              May  be set when invoking cpack in order to trace debug informa‐
3039              tion during CPack RPM run. For example you may launch CPack like
3040              this:
3041
3042                 cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
3043
3044       CPACK_RPM_USER_BINARY_SPECFILE
3045
3046       CPACK_RPM_<componentName>_USER_BINARY_SPECFILE
3047              A user provided spec file.
3048
3049              • Mandatory : NO
3050
3051              • Default   : -
3052
3053              May  be  set  by the user in order to specify a USER binary spec
3054              file to be used by the CPack RPM generator instead of generating
3055              the  file.   The  specified  file  will  be processed by config‐
3056              ure_file( @ONLY).
3057
3058       CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
3059              Spec file template.
3060
3061              • Mandatory : NO
3062
3063              • Default   : -
3064
3065              If set CPack will generate a template for USER specified  binary
3066              spec  file and stop with an error. For example launch CPack like
3067              this:
3068
3069                 cpack -D CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE=1 -G RPM
3070
3071              The user may then use this file in order to  hand-craft  is  own
3072              binary     spec     file     which     may    be    used    with
3073              CPACK_RPM_USER_BINARY_SPECFILE.
3074
3075       CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
3076
3077       CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
3078
3079       CPACK_RPM_PRE_TRANS_SCRIPT_FILE
3080              Path  to  file  containing   pre   install/uninstall/transaction
3081              script.
3082
3083              • Mandatory : NO
3084
3085              • Default   : -
3086
3087              May  be used to embed a pre installation/uninstallation/transac‐
3088              tion script in the spec file.   The  referred  script  file  (or
3089              both)  will  be  read  and directly put after the %pre or %preun
3090              section If CPACK_RPM_COMPONENT_INSTALL is  set  to  ON  the  in‐
3091              stall/uninstall/transaction  script  for  each  component can be
3092              overridden  with  CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE,
3093              CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE,             and
3094              CPACK_RPM_<COMPONENT>_PRE_TRANS_SCRIPT_FILE One may verify which
3095              scriptlet has been included with:
3096
3097                 rpm -qp --scripts  package.rpm
3098
3099              New  in  version 3.18: The CPACK_RPM_PRE_TRANS_SCRIPT_FILE vari‐
3100              able.
3101
3102
3103       CPACK_RPM_POST_INSTALL_SCRIPT_FILE
3104
3105       CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
3106
3107       CPACK_RPM_POST_TRANS_SCRIPT_FILE
3108              Path  to  file  containing  post   install/uninstall/transaction
3109              script.
3110
3111              • Mandatory : NO
3112
3113              • Default   : -
3114
3115              May be used to embed a post installation/uninstallation/transac‐
3116              tion script in the spec file.   The  referred  script  file  (or
3117              both)  will  be read and directly put after the %post or %postun
3118              section.  If CPACK_RPM_COMPONENT_INSTALL is set to  ON  the  in‐
3119              stall/uninstall/transaction  script  for  each  component can be
3120              overridden with  CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE,
3121              CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE,            and
3122              CPACK_RPM_<COMPONENT>_POST_TRANS_SCRIPT_FILE  One   may   verify
3123              which scriptlet has been included with:
3124
3125                 rpm -qp --scripts  package.rpm
3126
3127              New  in version 3.18: The CPACK_RPM_POST_TRANS_SCRIPT_FILE vari‐
3128              able.
3129
3130
3131       CPACK_RPM_USER_FILELIST
3132
3133       CPACK_RPM_<COMPONENT>_USER_FILELIST
3134
3135              • Mandatory : NO
3136
3137              • Default   : -
3138
3139              May be used to explicitly specify %(<directive>)  file  line  in
3140              the  spec  file.  Like %config(noreplace) or any other directive
3141              that be found in the %files section. Since the CPack RPM genera‐
3142              tor  is  generating the list of files (and directories) the user
3143              specified files of the CPACK_RPM_<COMPONENT>_USER_FILELIST  list
3144              will  be removed from the generated list. If referring to direc‐
3145              tories do not add a trailing slash.
3146
3147              New in version 3.8: You can have multiple directives  per  line,
3148              as in %attr(600,root,root) %config(noreplace).
3149
3150
3151       CPACK_RPM_CHANGELOG_FILE
3152              RPM changelog file.
3153
3154              • Mandatory : NO
3155
3156              • Default   : -
3157
3158              May be used to embed a changelog in the spec file.  The referred
3159              file will be read and directly put after the %changelog section.
3160
3161       CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST
3162              list of path to be excluded.
3163
3164              • Mandatory : NO
3165
3166
3167
3168                Default
3169                       /etc /etc/init.d /usr  /usr/bin  /usr/include  /usr/lib
3170                       /usr/libx32  /usr/lib64  /usr/share  /usr/share/aclocal
3171                       /usr/share/doc
3172
3173              May be used to exclude path  (directories  or  files)  from  the
3174              auto-generated  list  of  paths discovered by CPack RPM. The de‐
3175              fault value contains a reasonable set of values if the  variable
3176              is  not  defined  by the user. If the variable is defined by the
3177              user then the CPack RPM generator will NOT any  of  the  default
3178              path.  If you want to add some path to the default list then you
3179              can use CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION variable.
3180
3181              New in version 3.10: Added  /usr/share/aclocal  to  the  default
3182              list of excludes.
3183
3184
3185       CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
3186              additional list of path to be excluded.
3187
3188              • Mandatory : NO
3189
3190              • Default   : -
3191
3192              May be used to add more exclude path (directories or files) from
3193              the   initial   default   list   of    excluded    paths.    See
3194              CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST.
3195
3196       CPACK_RPM_RELOCATION_PATHS
3197              New in version 3.2.
3198
3199
3200              Packages relocation paths list.
3201
3202              • Mandatory : NO
3203
3204              • Default   : -
3205
3206              May  be  used to specify more than one relocation path per relo‐
3207              catable RPM.  Variable contains a list of relocation paths  that
3208              if     relative     are     prefixed    by    the    value    of
3209              CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX  or   by   the   value   of
3210              CPACK_PACKAGING_INSTALL_PREFIX  if  the component version is not
3211              provided.  Variable is not component based as its content can be
3212              used to set a different path prefix for e.g. binary dir and doc‐
3213              umentation dir at the same time.  Only  prefixes  that  are  re‐
3214              quired by a certain component are added to that component - com‐
3215              ponent must contain at least  one  file/directory/symbolic  link
3216              with  CPACK_RPM_RELOCATION_PATHS prefix for a certain relocation
3217              path to be added. Package will not contain any relocation  paths
3218              if  there  are no files/directories/symbolic links on any of the
3219              provided prefix locations.  Packages that either do not  contain
3220              any relocation paths or contain files/directories/symbolic links
3221              that are outside relocation paths print  out  an  AUTHOR_WARNING
3222              that RPM will be partially relocatable.
3223
3224       CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX
3225              New in version 3.2.
3226
3227
3228              Per component relocation path install prefix.
3229
3230              • Mandatory : NO
3231
3232              • Default   : CPACK_PACKAGING_INSTALL_PREFIX
3233
3234              May  be used to set per component CPACK_PACKAGING_INSTALL_PREFIX
3235              for relocatable RPM packages.
3236
3237       CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION
3238
3239       CPACK_RPM_NO_<COMPONENT>_INSTALL_PREFIX_RELOCATION
3240              New in version 3.3.
3241
3242
3243              Removal of default install prefix from relocation paths list.
3244
3245              • Mandatory : NO
3246
3247
3248
3249                Default
3250                       CPACK_PACKAGING_INSTALL_PREFIX   or   CPACK_RPM_<COMPO‐
3251                       NENT>_PACKAGE_PREFIX  are  treated as one of relocation
3252                       paths
3253
3254              May  be  used  to  remove   CPACK_PACKAGING_INSTALL_PREFIX   and
3255              CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX from relocatable RPM prefix
3256              paths.
3257
3258       CPACK_RPM_ADDITIONAL_MAN_DIRS
3259              New in version 3.3.
3260
3261
3262              • Mandatory : NO
3263
3264              • Default   : -
3265
3266              May be used to set additional man dirs that could potentially be
3267              compressed by brp-compress RPM macro. Variable content must be a
3268              list of regular expressions that point to directories containing
3269              man  files  or to man files directly. Note that in order to com‐
3270              press man pages a path must also be present in brp-compress  RPM
3271              script and that brp-compress script must be added to RPM config‐
3272              uration by the operating system.
3273
3274              Regular expressions that are added by default  were  taken  from
3275              brp-compress RPM macro:
3276
3277              • /usr/man/man.*
3278
3279              • /usr/man/.*/man.*
3280
3281              • /usr/info.*
3282
3283              • /usr/share/man/man.*
3284
3285              • /usr/share/man/.*/man.*
3286
3287              • /usr/share/info.*
3288
3289              • /usr/kerberos/man.*
3290
3291              • /usr/X11R6/man/man.*
3292
3293              • /usr/lib/perl5/man/man.*
3294
3295              • /usr/share/doc/.*/man/man.*
3296
3297              • /usr/lib/.*/man/man.*
3298
3299       CPACK_RPM_DEFAULT_USER
3300
3301       CPACK_RPM_<compName>_DEFAULT_USER
3302              New in version 3.6.
3303
3304
3305              default user ownership of RPM content
3306
3307              • Mandatory : NO
3308
3309              • Default   : root
3310
3311              Value  should  be  user  name and not UID.  Note that <compName>
3312              must be in upper-case.
3313
3314       CPACK_RPM_DEFAULT_GROUP
3315
3316       CPACK_RPM_<compName>_DEFAULT_GROUP
3317              New in version 3.6.
3318
3319
3320              default group ownership of RPM content
3321
3322              • Mandatory : NO
3323
3324              • Default   : root
3325
3326              Value should be group name and not GID.   Note  that  <compName>
3327              must be in upper-case.
3328
3329       CPACK_RPM_DEFAULT_FILE_PERMISSIONS
3330
3331       CPACK_RPM_<compName>_DEFAULT_FILE_PERMISSIONS
3332              New in version 3.6.
3333
3334
3335              default permissions used for packaged files
3336
3337              • Mandatory : NO
3338
3339              • Default   : - (system default)
3340
3341              Accepted  values  are  lists with PERMISSIONS. Valid permissions
3342              are:
3343
3344              • OWNER_READ
3345
3346              • OWNER_WRITE
3347
3348              • OWNER_EXECUTE
3349
3350              • GROUP_READ
3351
3352              • GROUP_WRITE
3353
3354              • GROUP_EXECUTE
3355
3356              • WORLD_READ
3357
3358              • WORLD_WRITE
3359
3360              • WORLD_EXECUTE
3361
3362              Note that <compName> must be in upper-case.
3363
3364       CPACK_RPM_DEFAULT_DIR_PERMISSIONS
3365
3366       CPACK_RPM_<compName>_DEFAULT_DIR_PERMISSIONS
3367              New in version 3.6.
3368
3369
3370              default permissions used for packaged directories
3371
3372              • Mandatory : NO
3373
3374              • Default   : - (system default)
3375
3376              Accepted values are lists with  PERMISSIONS.  Valid  permissions
3377              are  the  same  as for CPACK_RPM_DEFAULT_FILE_PERMISSIONS.  Note
3378              that <compName> must be in upper-case.
3379
3380       CPACK_RPM_INSTALL_WITH_EXEC
3381              New in version 3.11.
3382
3383
3384              force execute permissions on programs and shared libraries
3385
3386              • Mandatory : NO
3387
3388              • Default   : - (system default)
3389
3390              Force set owner, group and world execute permissions on programs
3391              and  shared  libraries.  This can be used for creating valid rpm
3392              packages on systems such as Debian where shared libraries do not
3393              have execute permissions set.
3394
3395       NOTE:
3396          Programs  and  shared  libraries without execute permissions are ig‐
3397          nored during separation of debug symbols from the binary for  debug‐
3398          info packages.
3399
3400   Packaging of Symbolic Links
3401       New in version 3.3.
3402
3403
3404       The CPack RPM generator supports packaging of symbolic links:
3405
3406          execute_process(COMMAND ${CMAKE_COMMAND}
3407            -E create_symlink <relative_path_location> <symlink_name>)
3408          install(FILES ${CMAKE_CURRENT_BINARY_DIR}/<symlink_name>
3409            DESTINATION <symlink_location> COMPONENT libraries)
3410
3411       Symbolic  links will be optimized (paths will be shortened if possible)
3412       before being added to the package or if multiple relocation  paths  are
3413       detected, a post install symlink relocation script will be generated.
3414
3415       Symbolic links may point to locations that are not packaged by the same
3416       package (either a different component or even not packaged at all)  but
3417       those  locations  will be treated as if they were a part of the package
3418       while determining if symlink should be either created or present  in  a
3419       post install script - depending on relocation paths.
3420
3421       Changed  in version 3.6: Symbolic links that point to locations outside
3422       packaging path produce a warning and are  treated  as  non  relocatable
3423       permanent symbolic links.  Previous versions of CMake produced an error
3424       in this case.
3425
3426
3427       Currently there are a few limitations though:
3428
3429       • For  component  based  packaging  component  interdependency  is  not
3430         checked  when  processing  symbolic links. Symbolic links pointing to
3431         content of a different component are  treated  the  same  way  as  if
3432         pointing to location that will not be packaged.
3433
3434       • Symbolic  links pointing to a location through one or more intermedi‐
3435         ate symbolic links will not be handled differently - if the  interme‐
3436         diate  symbolic  link(s) is also on a relocatable path, relocating it
3437         during package installation may cause initial symbolic link to  point
3438         to an invalid location.
3439
3440   Packaging of debug information
3441       New in version 3.7.
3442
3443
3444       Debuginfo  packages  contain  debug  symbols  and sources for debugging
3445       packaged binaries.
3446
3447       Debuginfo RPM packaging has its own set of variables:
3448
3449       CPACK_RPM_DEBUGINFO_PACKAGE
3450
3451       CPACK_RPM_<component>_DEBUGINFO_PACKAGE
3452              Enable generation of debuginfo RPM package(s).
3453
3454              • Mandatory : NO
3455
3456              • Default   : OFF
3457
3458       NOTE:
3459          Binaries must contain debug symbols before packaging so  use  either
3460          Debug or RelWithDebInfo for CMAKE_BUILD_TYPE variable value.
3461
3462       NOTE:
3463          Packages  generated  from packages without binary files, with binary
3464          files but without execute permissions or without debug symbols  will
3465          cause packaging termination.
3466
3467       CPACK_BUILD_SOURCE_DIRS
3468              Provides  locations  of  root  directories  of source files from
3469              which binaries were built.
3470
3471              • Mandatory : YES if CPACK_RPM_DEBUGINFO_PACKAGE is set
3472
3473              • Default   : -
3474
3475       NOTE:
3476          For CMake project CPACK_BUILD_SOURCE_DIRS is set by default to point
3477          to CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR paths.
3478
3479       NOTE:
3480          Sources  with path prefixes that do not fall under any location pro‐
3481          vided with CPACK_BUILD_SOURCE_DIRS will not be present in  debuginfo
3482          package.
3483
3484       CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX
3485
3486       CPACK_RPM_<component>_BUILD_SOURCE_DIRS_PREFIX
3487              Prefix  of  location where sources will be placed during package
3488              installation.
3489
3490              • Mandatory : YES if CPACK_RPM_DEBUGINFO_PACKAGE is set
3491
3492
3493
3494                Default
3495                       "/usr/src/debug/<CPACK_PACKAGE_FILE_NAME>" and for com‐
3496                       ponent      packaging      "/usr/src/debug/<CPACK_PACK‐
3497                       AGE_FILE_NAME>-<component>"
3498
3499       NOTE:
3500          Each source path prefix  is  additionally  suffixed  by  src_<index>
3501          where  index  is index of the path used from CPACK_BUILD_SOURCE_DIRS
3502          variable.    This     produces     <CPACK_RPM_BUILD_SOURCE_DIRS_PRE‐
3503          FIX>/src_<index> replacement path.  Limitation is that replaced path
3504          part must be shorter or of equal length than the length of  its  re‐
3505          placement.     If     that     is     not     the     case    either
3506          CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX variable  has  to  be  set  to  a
3507          shorter path or source directories must be placed on a longer path.
3508
3509       CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS
3510              Directories  containing sources that should be excluded from de‐
3511              buginfo packages.
3512
3513              • Mandatory : NO
3514
3515              • Default   : "/usr /usr/src /usr/src/debug"
3516
3517              Listed paths are owned by other RPM packages and  should  there‐
3518              fore not be deleted on debuginfo package uninstallation.
3519
3520       CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS_ADDITION
3521              Paths        that        should       be       appended       to
3522              CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS for exclusion.
3523
3524              • Mandatory : NO
3525
3526              • Default   : -
3527
3528       CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE
3529              New in version 3.8.
3530
3531
3532              Create a single debuginfo package even if  components  packaging
3533              is set.
3534
3535              • Mandatory : NO
3536
3537              • Default   : OFF
3538
3539              When  this  variable  is  enabled it produces a single debuginfo
3540              package even if component packaging is enabled.
3541
3542              When using this feature in combination with components packaging
3543              and  there  is  more  than  one component this variable requires
3544              CPACK_RPM_MAIN_COMPONENT to be set.
3545
3546       NOTE:
3547          If none of the CPACK_RPM_<component>_DEBUGINFO_PACKAGE variables  is
3548          set then CPACK_RPM_DEBUGINFO_PACKAGE is automatically set to ON when
3549          CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE is set.
3550
3551       CPACK_RPM_DEBUGINFO_FILE_NAME
3552
3553       CPACK_RPM_<component>_DEBUGINFO_FILE_NAME
3554              New in version 3.9.
3555
3556
3557              Debuginfo package file name.
3558
3559              • Mandatory : NO
3560
3561              • Default   : rpmbuild tool generated package file name
3562
3563              Alternatively provided debuginfo package file name must end with
3564              .rpm suffix and should differ from file names of other generated
3565              packages.
3566
3567              Variable may contain @cpack_component@ placeholder which will be
3568              replaced  by  component  name  if component packaging is enabled
3569              otherwise it deletes the placeholder.
3570
3571              Setting the variable to RPM-DEFAULT may be  used  to  explicitly
3572              set filename generation to default.
3573
3574       NOTE:
3575          CPACK_RPM_FILE_NAME  also  supports  rpmbuild tool generated package
3576          file name - disabled by default but can be enabled  by  setting  the
3577          variable to RPM-DEFAULT.
3578
3579   Packaging of sources (SRPM)
3580       New in version 3.7.
3581
3582
3583       SRPM packaging is enabled by setting CPACK_RPM_PACKAGE_SOURCES variable
3584       while usually using CPACK_INSTALLED_DIRECTORIES variable to provide di‐
3585       rectory containing CMakeLists.txt and source files.
3586
3587       For CMake projects SRPM package would be produced by executing:
3588
3589          cpack -G RPM --config ./CPackSourceConfig.cmake
3590
3591       NOTE:
3592          Produced  SRPM  package  is  expected to be built with cmake(1) exe‐
3593          cutable and packaged with cpack(1) executable so CMakeLists.txt  has
3594          to  be located in root source directory and must be able to generate
3595          binary rpm packages by executing cpack -G command. The two  executa‐
3596          bles as well as rpmbuild must also be present when generating binary
3597          rpm packages from the produced SRPM package.
3598
3599       Once the SRPM package is generated it can be used  to  generate  binary
3600       packages  by creating a directory structure for rpm generation and exe‐
3601       cuting rpmbuild tool:
3602
3603          mkdir -p build_dir/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
3604          rpmbuild --define "_topdir <path_to_build_dir>" --rebuild <SRPM_file_name>
3605
3606       Generated packages will be located in build_dir/RPMS directory  or  its
3607       sub directories.
3608
3609       NOTE:
3610          SRPM  package internally uses CPack/RPM generator to generate binary
3611          packages so CMakeScripts.txt can decide during the  SRPM  to  binary
3612          rpm  generation step what content the package(s) should have as well
3613          as how they should be packaged (monolithic or components). CMake can
3614          decide  this  for  e.g.  by reading environment variables set by the
3615          package manager before starting the process of generating binary rpm
3616          packages. This way a single SRPM package can be used to produce dif‐
3617          ferent binary rpm packages on different platforms depending  on  the
3618          platform's packaging rules.
3619
3620       Source RPM packaging has its own set of variables:
3621
3622       CPACK_RPM_PACKAGE_SOURCES
3623              Should  the  content be packaged as a source rpm (default is bi‐
3624              nary rpm).
3625
3626              • Mandatory : NO
3627
3628              • Default   : OFF
3629
3630       NOTE:
3631          For cmake projects CPACK_RPM_PACKAGE_SOURCES variable is set to  OFF
3632          in  CPackConfig.cmake  and  ON  in CPackSourceConfig.cmake generated
3633          files.
3634
3635       CPACK_RPM_SOURCE_PKG_BUILD_PARAMS
3636              Additional command-line parameters  provided  to  cmake(1)  exe‐
3637              cutable.
3638
3639              • Mandatory : NO
3640
3641              • Default   : -
3642
3643       CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX
3644              Packaging install prefix that would be provided in CPACK_PACKAG‐
3645              ING_INSTALL_PREFIX variable for producing binary RPM packages.
3646
3647              • Mandatory : YES
3648
3649              • Default   : "/"
3650
3651       CPACK_RPM_BUILDREQUIRES
3652              List of source rpm build dependencies.
3653
3654              • Mandatory : NO
3655
3656              • Default   : -
3657
3658              May  be  used  to  set  source  RPM  build  dependencies  (Buil‐
3659              dRequires).  Note  that  you must enclose the complete build re‐
3660              quirements string between quotes, for example:
3661
3662                 set(CPACK_RPM_BUILDREQUIRES "python >= 2.5.0, cmake >= 2.8")
3663
3664   CPack WIX Generator
3665       CPack WIX generator specific options
3666
3667       New in version 3.7: Support  CPACK_COMPONENT_<compName>_DISABLED  vari‐
3668       able.
3669
3670
3671   Variables specific to CPack WIX generator
3672       The following variables are specific to the installers built on Windows
3673       using WiX.
3674
3675       CPACK_WIX_UPGRADE_GUID
3676              Upgrade GUID (Product/@UpgradeCode)
3677
3678              Will be automatically generated unless explicitly provided.
3679
3680              It should be explicitly set to  a  constant  generated  globally
3681              unique identifier (GUID) to allow your installers to replace ex‐
3682              isting installations that use the same GUID.
3683
3684              You may for example explicitly set this variable in your  CMake‐
3685              Lists.txt to the value that has been generated per default.  You
3686              should not use GUIDs that you did not generate yourself or which
3687              may belong to other projects.
3688
3689              A GUID shall have the following fixed length syntax:
3690
3691                 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
3692
3693              (each X represents an uppercase hexadecimal digit)
3694
3695       CPACK_WIX_PRODUCT_GUID
3696              Product GUID (Product/@Id)
3697
3698              Will be automatically generated unless explicitly provided.
3699
3700              If  explicitly provided this will set the Product Id of your in‐
3701              staller.
3702
3703              The installer will abort if it detects a pre-existing  installa‐
3704              tion that uses the same GUID.
3705
3706              The  GUID  shall  use  the  syntax  described  for CPACK_WIX_UP‐
3707              GRADE_GUID.
3708
3709       CPACK_WIX_LICENSE_RTF
3710              RTF License File
3711
3712              If CPACK_RESOURCE_FILE_LICENSE has an .rtf extension it is  used
3713              as-is.
3714
3715              If  CPACK_RESOURCE_FILE_LICENSE  has an .txt extension it is im‐
3716              plicitly converted to RTF by the WIX  Generator.   The  expected
3717              encoding of the .txt file is UTF-8.
3718
3719              With  CPACK_WIX_LICENSE_RTF  you  can  override the license file
3720              used by the WIX Generator in case CPACK_RESOURCE_FILE_LICENSE is
3721              in an unsupported format or the .txt -> .rtf conversion does not
3722              work as expected.
3723
3724       CPACK_WIX_PRODUCT_ICON
3725              The Icon shown next to the program name in Add/Remove programs.
3726
3727              If set, this icon is used in place of the default icon.
3728
3729       CPACK_WIX_UI_REF
3730              This variable allows you to override the Id of the <UIRef>  ele‐
3731              ment in the WiX template.
3732
3733              The default is WixUI_InstallDir in case no CPack components have
3734              been defined and WixUI_FeatureTree otherwise.
3735
3736       CPACK_WIX_UI_BANNER
3737              The bitmap will appear at the top of all installer  pages  other
3738              than the welcome and completion dialogs.
3739
3740              If set, this image will replace the default banner image.
3741
3742              This image must be 493 by 58 pixels.
3743
3744       CPACK_WIX_UI_DIALOG
3745              Background bitmap used on the welcome and completion dialogs.
3746
3747              If  this variable is set, the installer will replace the default
3748              dialog image.
3749
3750              This image must be 493 by 312 pixels.
3751
3752       CPACK_WIX_PROGRAM_MENU_FOLDER
3753              Start menu folder name for launcher.
3754
3755              If this variable  is  not  set,  it  will  be  initialized  with
3756              CPACK_PACKAGE_NAME
3757
3758              New in version 3.16: If this variable is set to ., then applica‐
3759              tion shortcuts will be created directly in the  start  menu  and
3760              the uninstaller shortcut will be omitted.
3761
3762
3763       CPACK_WIX_CULTURES
3764              Language(s) of the installer
3765
3766              Languages are compiled into the WixUI extension library.  To use
3767              them, simply provide the name of the culture.   If  you  specify
3768              more  than one culture identifier in a comma or semicolon delim‐
3769              ited list, the first one that is found will be  used.   You  can
3770              find      a      list     of     supported     languages     at:
3771              http://wix.sourceforge.net/manual-wix3/WixUI_localization.htm
3772
3773       CPACK_WIX_TEMPLATE
3774              Template file for WiX generation
3775
3776              If this variable is set, the specified template will be used  to
3777              generate  the WiX wxs file.  This should be used if further cus‐
3778              tomization of the output is required.
3779
3780              If this variable is not set, the default MSI  template  included
3781              with CMake will be used.
3782
3783       CPACK_WIX_PATCH_FILE
3784              Optional  list  of  XML files with fragments to be inserted into
3785              generated WiX sources.
3786
3787              New in version 3.5: Support listing multiple patch files.
3788
3789
3790              This optional variable can be used to specify an XML  file  that
3791              the  WIX  generator will use to inject fragments into its gener‐
3792              ated source files.
3793
3794              Patch files understood by the CPack WIX generator roughly follow
3795              this RELAX NG compact schema:
3796
3797                 start = CPackWiXPatch
3798
3799                 CPackWiXPatch = element CPackWiXPatch { CPackWiXFragment* }
3800
3801                 CPackWiXFragment = element CPackWiXFragment
3802                 {
3803                     attribute Id { string },
3804                     fragmentContent*
3805                 }
3806
3807                 fragmentContent = element * - CPackWiXFragment
3808                 {
3809                     (attribute * { text } | text | fragmentContent)*
3810                 }
3811
3812              Currently  fragments  can be injected into most Component, File,
3813              Directory and Feature elements.
3814
3815              New in version 3.3: The following additional special Ids can  be
3816              used:
3817
3818#PRODUCT for the <Product> element.
3819
3820#PRODUCTFEATURE for the root <Feature> element.
3821
3822
3823              New  in  version  3.7: Support patching arbitrary <Feature> ele‐
3824              ments.
3825
3826
3827              New in version 3.9: Allow setting additional attributes.
3828
3829
3830              The following example illustrates how this works.
3831
3832              Given that the WIX generator creates the following XML element:
3833
3834                 <Component Id="CM_CP_applications.bin.my_libapp.exe" Guid="*"/>
3835
3836              The following XML patch file may be used to inject  an  Environ‐
3837              ment element into it:
3838
3839                 <CPackWiXPatch>
3840                   <CPackWiXFragment Id="CM_CP_applications.bin.my_libapp.exe">
3841                     <Environment Id="MyEnvironment" Action="set"
3842                       Name="MyVariableName" Value="MyVariableValue"/>
3843                   </CPackWiXFragment>
3844                 </CPackWiXPatch>
3845
3846       CPACK_WIX_EXTRA_SOURCES
3847              Extra WiX source files
3848
3849              This  variable  provides  an  optional  list of extra WiX source
3850              files (.wxs) that should be compiled and linked.  The full  path
3851              to source files is required.
3852
3853       CPACK_WIX_EXTRA_OBJECTS
3854              Extra WiX object files or libraries
3855
3856              This  variable  provides  an  optional  list of extra WiX object
3857              (.wixobj) and/or WiX library (.wixlib) files.  The full path  to
3858              objects and libraries is required.
3859
3860       CPACK_WIX_EXTENSIONS
3861              This  variable  provides a list of additional extensions for the
3862              WiX tools light and candle.
3863
3864       CPACK_WIX_<TOOL>_EXTENSIONS
3865              This is  the  tool  specific  version  of  CPACK_WIX_EXTENSIONS.
3866              <TOOL> can be either LIGHT or CANDLE.
3867
3868       CPACK_WIX_<TOOL>_EXTRA_FLAGS
3869              This  list  variable  allows you to pass additional flags to the
3870              WiX tool <TOOL>.
3871
3872              Use it at your own risk.  Future versions of CPack may  generate
3873              flags which may be in conflict with your own flags.
3874
3875              <TOOL> can be either LIGHT or CANDLE.
3876
3877       CPACK_WIX_CMAKE_PACKAGE_REGISTRY
3878              If  this  variable is set the generated installer will create an
3879              entry  in  the  windows  registry  key  HKEY_LOCAL_MACHINE\Soft‐
3880              ware\Kitware\CMake\Packages\<PackageName>  The value for <Packa‐
3881              geName> is provided by this variable.
3882
3883              Assuming you also install a CMake configuration file  this  will
3884              allow  other  CMake  projects  to  find  your  package  with the
3885              find_package() command.
3886
3887       CPACK_WIX_PROPERTY_<PROPERTY>
3888              New in version 3.1.
3889
3890
3891              This variable can be used to provide a value for the Windows In‐
3892              staller property <PROPERTY>
3893
3894              The  following list contains some example properties that can be
3895              used to customize  information  under  "Programs  and  Features"
3896              (also known as "Add or Remove Programs")
3897
3898              • ARPCOMMENTS - Comments
3899
3900              • ARPHELPLINK - Help and support information URL
3901
3902              • ARPURLINFOABOUT - General information URL
3903
3904              • ARPURLUPDATEINFO - Update information URL
3905
3906              • ARPHELPTELEPHONE - Help and support telephone number
3907
3908              • ARPSIZE - Size (in kilobytes) of the application
3909
3910       CPACK_WIX_ROOT_FEATURE_TITLE
3911              New in version 3.7.
3912
3913
3914              Sets  the name of the root install feature in the WIX installer.
3915              Same as CPACK_COMPONENT_<compName>_DISPLAY_NAME for components.
3916
3917       CPACK_WIX_ROOT_FEATURE_DESCRIPTION
3918              New in version 3.7.
3919
3920
3921              Sets the description of the root install feature in the WIX  in‐
3922              staller. Same as CPACK_COMPONENT_<compName>_DESCRIPTION for com‐
3923              ponents.
3924
3925       CPACK_WIX_SKIP_PROGRAM_FOLDER
3926              New in version 3.7.
3927
3928
3929              If this variable is set to true, the default install location of
3930              the  generated  package  will be CPACK_PACKAGE_INSTALL_DIRECTORY
3931              directly.  The install location will not be  located  relatively
3932              below ProgramFiles or ProgramFiles64.
3933
3934                 NOTE:
3935                     Installers  created with this feature do not take differ‐
3936                     ences between the system on which the installer  is  cre‐
3937                     ated  and the system on which the installer might be used
3938                     into account.
3939
3940                     It is therefore possible that the  installer  e.g.  might
3941                     try  to install onto a drive that is unavailable or unin‐
3942                     tended or a path that does not follow the localization or
3943                     convention  of  the  system  on which the installation is
3944                     performed.
3945
3946       CPACK_WIX_ROOT_FOLDER_ID
3947              New in version 3.9.
3948
3949
3950              This variable allows specification of a custom root  folder  ID.
3951              The  generator  specific  <64>  token can be used for folder IDs
3952              that come in 32-bit and 64-bit variants.  In 32-bit  builds  the
3953              token will expand empty while in 64-bit builds it will expand to
3954              64.
3955
3956              When unset generated installers will default installing to  Pro‐
3957              gramFiles<64>Folder.
3958
3959       CPACK_WIX_ROOT
3960              This  variable  can optionally be set to the root directory of a
3961              custom WiX Toolset installation.
3962
3963              When unspecified CPack will try to locate a WiX Toolset  instal‐
3964              lation via the WIX environment variable instead.
3965
3966       CPACK_WIX_CUSTOM_XMLNS
3967              New in version 3.19.
3968
3969
3970              This  variable  provides a list of custom namespace declarations
3971              that are necessary for using WiX  extensions.  Each  declaration
3972              should  be  in  the form name=url, where name is the plain name‐
3973              space without the usual xmlns: prefix and  url  is  an  unquoted
3974              namespace  url.  A  list  of  commonly known WiX schemata can be
3975              found here: https://wixtoolset.org/documentation/manual/v3/xsd/
3976
3978       2000-2021 Kitware, Inc. and Contributors
3979
3980
3981
3982
39833.20.3                           May 30, 2021              CPACK-GENERATORS(7)
Impressum