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