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