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