![]() |
![]()
| ![]() |
![]()
NAMEcpack-generators - CPack Generator Reference GENERATORSCPack Archive GeneratorCPack generator for packaging files into an archive, which can have any of the following formats:
New in version 3.1: 7Z and TXZ formats support. New in version 3.16: TZST format support. When this generator is called from CPackSourceConfig.cmake (or through the package_source target), then the generated archive will contain all files in the project directory, except those specified in CPACK_SOURCE_IGNORE_FILES. The following is one example of packaging all source files of a project: set(CPACK_SOURCE_GENERATOR "TGZ") set(CPACK_SOURCE_IGNORE_FILES When this generator is called from CPackConfig.cmake (or through the package target), then the generated archive will contain all files that have been installed via CMake's install() command (and the deprecated commands install_files(), install_programs(), and install_targets()). Variables specific to CPack Archive generator
The extension is determined from the archive format (see list above) and automatically appended to the file name. Note that <component> is all uppercase in the variable name. New in version 3.9: Per-component CPACK_ARCHIVE_<component>_FILE_NAME variables.
If enabled (ON) multiple packages are generated. By default a single package containing files of all components is generated. Variables used by CPack Archive generatorThese variables are used by the Archive generator, but are also available to CPack generators which are essentially archives at their core. These include:
If set to 0, the number of available cores on the machine will be used instead. Note that not all compression modes support threading in all environments. New in version 3.21: Official CMake binaries available on cmake.org now ship with a liblzma that supports parallel compression. Older versions did not. CPack Bundle GeneratorCPack Bundle generator (macOS) specific options Variables specific to CPack Bundle generatorInstallers built on macOS using the Bundle generator use the aforementioned DragNDrop (CPACK_DMG_xxx) variables, plus the following Bundle-specific parameters (CPACK_BUNDLE_xxx).
CPack Cygwin GeneratorCygwin CPack generator (Cygwin). Variables affecting the CPack Cygwin generator
Variables specific to CPack Cygwin generatorThe following variable is specific to installers build on and/or for Cygwin:
CPack DEB GeneratorThe built in (binary) CPack DEB generator (Unix only) Variables specific to CPack Debian (DEB) generatorThe CPack DEB generator may be used to create DEB package using CPack. The CPack DEB generator is a CPack generator thus it uses the CPACK_XXX variables used by CPack. The CPack DEB generator should work on any Linux host but it will produce better deb package when Debian specific tools dpkg-xxx are usable on the build system. The CPack DEB generator has specific features which are controlled by the specifics CPACK_DEBIAN_XXX variables. CPACK_DEBIAN_<COMPONENT>_XXXX variables may be used in order to have component specific values. Note however that <COMPONENT> refers to the grouping name written in upper case. It may be either a component name or a component GROUP name. Here are some CPack DEB generator wiki resources that are here for historic reasons and are no longer maintained but may still prove useful:
List of CPack DEB generator specific variables:
If enabled (ON) multiple packages are generated. By default a single package containing files of all components is generated.
New in version 3.5: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_NAME variables. See https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-source
This may be set to:
<PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb This setting recommended as the preferred behavior, but for backward compatibility with the CPack DEB generator in CMake prior to version 3.6, this is not the default. Without this, duplicate names may occur. Duplicate files get overwritten and it is up to the packager to set the variables in a manner that will prevent such errors.
Optional number that should be incremented when changing versioning schemas or fixing mistakes in the version numbers of older packages.
This variable may contain only alphanumerics (A-Za-z0-9) and the characters . + - ~ (full stop, plus, hyphen, tilde) and should start with a digit. If CPACK_DEBIAN_PACKAGE_RELEASE is not set then hyphens are not allowed. NOTE: For backward compatibility with CMake 3.9 and lower a
failed test of this variable's content is not a hard error when both
CPACK_DEBIAN_PACKAGE_RELEASE and CPACK_DEBIAN_PACKAGE_EPOCH
variables are not set. An author warning is reported instead.
This is the numbering of the DEB package itself, i.e. the version of the packaging and not the version of the content (see CPACK_DEBIAN_PACKAGE_VERSION). One may change the default value if the previous packaging was buggy and/or you want to put here a fancy Linux distro specific numbering.
New in version 3.6: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_ARCHITECTURE variables.
New in version 3.3: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS variables. NOTE: If CPACK_DEBIAN_PACKAGE_SHLIBDEPS or more
specifically CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS is set
for this component, the discovered dependencies will be appended to
CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS instead of
CPACK_DEBIAN_PACKAGE_DEPENDS. If
CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS is an empty string, only
the automatically discovered dependencies will be set for this
component.
Changed in version 3.31: The variable is always expanded as a list. Before it was expanded only if used in cooperation with CPACK_DEB_COMPONENT_INSTALL, CPACK_DEBIAN_PACKAGE_SHLIBDEPS or CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS. This meant that if a component had no shared libraries discovered (e.g. a package composed only of scripts) you had to join the list by yourself to obtain a valid Depends field. Example: set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libc6 (< 2.4)") list(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS cmake)
If after that description is not set, CPACK_PACKAGE_DESCRIPTION_SUMMARY going to be used if set. Otherwise, CPACK_PACKAGE_DESCRIPTION_SUMMARY will be added as the first line of description as defined in Debian Policy Manual. New in version 3.3: Per-component CPACK_COMPONENT_<compName>_DESCRIPTION variables. New in version 3.16: Per-component CPACK_DEBIAN_<COMPONENT>_DESCRIPTION variables. New in version 3.16: The CPACK_PACKAGE_DESCRIPTION_FILE variable.
New in version 3.5: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION variables. See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
Possible value is: gnutar NOTE: This variable previously defaulted to the paxr
value, but dpkg has never supported that tar format. For backwards
compatibility the paxr value will be mapped to gnutar and a
deprecation message will be emitted.
Possible values are:
New in version 3.5: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY variables. See https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities
New in version 3.12: The CMAKE_PROJECT_HOMEPAGE_URL variable. NOTE: The content of this field is a simple URL without any
surrounding characters such as <>.
NOTE: You may need set CMAKE_INSTALL_RPATH to an
appropriate value if you use this feature, because if you don't
dpkg-shlibdeps may fail to find your own shared libs. See
https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
NOTE: You can also set
CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS to an appropriate value if
you use this feature, in order to please dpkg-shlibdeps. However, you
should only do this for private shared libraries that could not get resolved
otherwise.
New in version 3.3: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS variables. New in version 3.6: Correct handling of $ORIGIN in CMAKE_INSTALL_RPATH.
NOTE: You should prefer to set CMAKE_INSTALL_RPATH to an
appropriate value if you use dpkg-shlibdeps. The current option is
really only needed for private shared library dependencies.
New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS variables. See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES variables. See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS variables. See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks
New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONFLICTS variables. See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts NOTE: This is a stronger restriction than Breaks, which
prevents the broken package from being configured while the breaking package
is in the "Unpacked" state but allows both packages to be unpacked
at the same time.
New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_PROVIDES variables. See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-virtual
New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_REPLACES variables. See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS variables. See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_SUGGESTS variables. See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
Allows to generate shlibs control file automatically. Compatibility is defined by CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY variable value. NOTE: Libraries are only considered if they have both library
name and version set. This can be done by setting SOVERSION property with
set_target_properties() command.
Defines compatibility policy for auto-generated shlibs control file. Possible values: =, >= See https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-sharedlibs-shlibdeps
Usage: set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA New in version 3.4: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONTROL_EXTRA variables.
Usage: set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE) This overrides the permissions on the original files, following the rules set by Debian policy https://www.debian.org/doc/debian-policy/ch-files.html#s-permissions-owners NOTE: The original permissions of the files will be used in the
final package unless this variable is set to TRUE. In particular, the
scripts should have the proper executable flag prior to the generation of the
package.
See https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-source NOTE: This value is not interpreted. It is possible to pass an
optional revision number of the referenced source package as well.
New in version 3.31: Per-component CPACK_DEBIAN_<COMPONENT>_PACKAGE_MULTIARCH variables. See https://wiki.debian.org/MultiArch/Hints NOTE: This value is validated. It must be one of the following
values: same, foreign, allowed.
Packaging of debug informationNew in version 3.13. Dbgsym packages contain debug symbols for debugging packaged binaries. Dbgsym packaging has its own set of variables:
NOTE: Setting this also strips the ELF files in the generated
non-dbgsym package, which results in debuginfo only being available in the
dbgsym package.
NOTE: Binaries must contain debug symbols before packaging so
use either Debug or RelWithDebInfo for CMAKE_BUILD_TYPE
variable value.
Additionally, if CPACK_STRIP_FILES is set, the files will be stripped before they get to the DEB generator, so will not contain debug symbols and a dbgsym package will not get built. Do not use with CPACK_STRIP_FILES. Building Debian packages on WindowsNew in version 3.10. To communicate UNIX file permissions from the install stage to the CPack DEB generator the cmake_mode_t NTFS alternate data stream (ADT) is used. When a filesystem without ADT support is used only owner read/write permissions can be preserved. Reproducible packagesNew in version 3.13. The environment variable SOURCE_DATE_EPOCH may be set to a UNIX timestamp, defined as the number of seconds, excluding leap seconds, since 01 Jan 1970 00:00:00 UTC. If set, the CPack DEB generator will use its value for timestamps in the package. CPack DragNDrop GeneratorThe DragNDrop CPack generator (macOS) creates a DMG image. Variables specific to CPack DragNDrop generatorThe following variables are specific to the DragNDrop installers built on macOS:
Common values are UDRO (UDIF read-only), UDZO (UDIF zlib-compressed) or UDBZ (UDIF bzip2-compressed). Refer to hdiutil(1) for more information on other available formats.
Path to an image file to be used as the background. This file will be copied to .background/background.<ext>, where <ext> is the original image file extension. The background image is installed into the image before CPACK_DMG_DS_STORE_SETUP_SCRIPT is executed or CPACK_DMG_DS_STORE is installed. By default no background image is set.
Control whether CPACK_RESOURCE_FILE_LICENSE, if set to a non-default value, is used as the license agreement provided when mounting the DMG. If CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE is not set, cpack(1) defaults to off. In a CMake project that uses the CPack module to generate CPackConfig.cmake, CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE must be explicitly enabled by the project to activate the SLA. See policy CMP0133. NOTE: This option was added in response to macOS 12.0's
deprecation of the hdiutil udifrez command to make its use optional.
CPack 3.22 and below always use CPACK_RESOURCE_FILE_LICENSE, if set to
a non-default value, as the DMG license.
For every language in this list, CPack will try to find files <language>.menu.txt and <language>.license.txt in the directory specified by the CPACK_DMG_SLA_DIR variable.
The filesystem format. Common values are APFS and HFS+. See man hdiutil for a full list of supported formats.
CPack External GeneratorNew in version 3.13. CPack provides many generators to create packages for a variety of platforms and packaging systems. The intention is for CMake/CPack to be a complete end-to-end solution for building and packaging a software project. However, it may not always be possible to use CPack for the entire packaging process, due to either technical limitations or policies that require the use of certain tools. For this reason, CPack provides the "External" generator, which allows external packaging software to take advantage of some of the functionality provided by CPack, such as component installation and the dependency graph. Integration with External Packaging ToolsThe CPack External generator generates a .json file containing the CPack internal metadata, which gives external software information on how to package the software. External packaging software may itself invoke CPack, consume the generated metadata, install and package files as required. Alternatively CPack can invoke an external packaging software through an optional custom CMake script in CPACK_EXTERNAL_PACKAGE_SCRIPT instead. Staging of installation files may also optionally be taken care of by the generator when enabled through the CPACK_EXTERNAL_ENABLE_STAGING variable. JSON FormatThe JSON metadata file contains a list of CPack components and component groups, the various options passed to cpack_add_component() and cpack_add_component_group(), the dependencies between the components and component groups, and various other options passed to CPack. The JSON's root object will always provide two fields: formatVersionMajor and formatVersionMinor, which are always integers that describe the output format of the generator. Backwards-compatible changes to the output format (for example, adding a new field that didn't exist before) cause the minor version to be incremented, and backwards-incompatible changes (for example, deleting a field or changing its meaning) cause the major version to be incremented and the minor version reset to 0. The format version is always of the format major.minor. In other words, it always has exactly two parts, separated by a period. You can request one or more specific versions of the output format as described below with CPACK_EXTERNAL_REQUESTED_VERSIONS. The output format will have a major version that exactly matches the requested major version, and a minor version that is greater than or equal to the requested minor version. If no version is requested with CPACK_EXTERNAL_REQUESTED_VERSIONS, the latest known major version is used by default. Currently, the only supported format is 1.0, which is described below. Version 1.0In addition to the standard format fields, format version 1.0 provides the following fields in the root:
Variables specific to CPack External generator
CPack FreeBSD GeneratorNew in version 3.10. The built in (binary) CPack FreeBSD (pkg) generator (Unix only) Variables affecting the CPack FreeBSD (pkg) generator
Variables specific to CPack FreeBSD (pkg) generatorThe CPack FreeBSD generator may be used to create pkg(8) packages -- these may be used on FreeBSD, DragonflyBSD, NetBSD, OpenBSD, but also on Linux or OSX, depending on the installed package-management tools -- using CPack. The CPack FreeBSD generator is a CPack generator and uses the CPACK_XXX variables used by CPack. It tries to reuse packaging information that may already be specified for Debian packages for the CPack DEB Generator. It also tries to reuse RPM packaging information when Debian does not specify. The CPack FreeBSD generator should work on any host with libpkg installed. The packages it produces are specific to the host architecture and ABI. The CPack FreeBSD generator sets package-metadata through CPACK_FREEBSD_XXX variables. The CPack FreeBSD generator, unlike the CPack Deb generator, does not specially support componentized packages; a single package is created from all the software artifacts created through CMake. All of the variables can be set specifically for FreeBSD packaging in the CPackConfig file or in CMakeLists.txt, but most of them have defaults that use general settings (e.g. CMAKE_PROJECT_NAME) or Debian-specific variables when those make sense (e.g. the homepage of an upstream project is usually unchanged by the flavor of packaging). When there is no Debian information to fall back on, but the RPM packaging has it, fall back to the RPM information (e.g. package license).
New in version 3.12: The CPACK_PACKAGE_HOMEPAGE_URL variable.
CPack Inno Setup GeneratorNew in version 3.27. Inno Setup is a free installer for Windows programs by Jordan Russell and Martijn Laan (https://jrsoftware.org/isinfo.php). This documentation explains Inno Setup generator specific options. The generator provides a lot of options like components. Unfortunately, not all features (e.g. component dependencies) are currently supported by Inno Setup and they're ignored by the generator for now. CPack requires Inno Setup 6 or greater. New in version 3.30: The generator is now available on non-Windows hosts, but requires Wine to run the Inno Setup tools. Variables specific to CPack Inno Setup generatorYou can use the following variables to change the behavior of the CPack INNOSETUP generator: GeneralNone of the following variables is required to be set for the Inno Setup generator to work. If a variable is marked as mandatory below but not set, its default value is taken. The variables can also contain Inno Setup constants like {app}. Please refer to the documentation of Inno Setup for more information. If you're asked to provide the path to any file, you can always give an absolute path or in most cases the relative path from the top-level directory where all files being installed by an install() instruction reside. CPack tries to escape quotes and other special characters for you. However, using special characters could cause problems. The following variable simplifies the usage of Inno Setup in CMake:
set(CMAKE_INNOSETUP_SETUP_AllowNoIcons OFF) If this option is turned on, the following line will be created in the output script: AllowNoIcons=no. Else, the following erroneous line will be created: AllowNoIcons=OFF The conversion is enabled in every Inno Setup specific variable. Setup Specific Variables
set(CPACK_INNOSETUP_SETUP_WizardSmallImageFile "my_bitmap.bmp") set(CPACK_INNOSETUP_SETUP_AllowNoIcons OFF) # This requires CPACK_INNOSETUP_USE_CMAKE_BOOL_FORMAT to be on All of these variables have higher priority than the others. Consider the following example: set(CPACK_INNOSETUP_SETUP_Password "admin") set(CPACK_INNOSETUP_PASSWORD "secret") The password will be admin at the end because CPACK_INNOSETUP_PASSWORD has less priority than CPACK_INNOSETUP_SETUP_Password.
File Specific VariablesAlthough all files being installed by an install() instruction are automatically processed and added to the installer, there are some variables to customize the installation process. Before using executables (only .exe or .com) in shortcuts (e.g. CPACK_CREATE_DESKTOP_LINKS) or [Run] entries, you've to add the raw file name (without path and extension) to CPACK_PACKAGE_EXECUTABLES and create a start menu shortcut for them. If you have two files with the same raw name (e.g. a/executable.exe and b/executable.com), an entry in the section is created twice. This will result in undefined behavior and is not recommended.
Source: "absolute\path\to\my_file.txt"; DestDir: "{app}"; Flags: ignoreversion ...and the following line for every directory: Name: "{app}\my_folder" You might want to change the destination directory or the flags of my_file.txt. Since we can also provide a relative path, the line you'd like to have, is the following: Source: "my_file.txt"; DestDir: "{userdocs}"; Flags: ignoreversion uninsneveruninstall You would do this by using my_file.txt as path and Source: "my_file.txt"; DestDir: "{userdocs}"; Flags: ignoreversion uninsneveruninstall as instruction. You've to take care of the escaping problem. So the CMake command would be: set(CPACK_INNOSETUP_CUSTOM_INSTALL_INSTRUCTIONS "my_file.txt;Source: \\\"my_file.txt\\\"\\; DestDir: \\\"{userdocs}\\\"\\; Flags: ignoreversion uninsneveruninstall") To improve readability, you should go around the escaping problem by using CPACK_VERBATIM_VARIABLES or by placing the instruction into a separate CPack project config file. If you customize the install instruction of a specific file, you lose the connection to its component. To go around, manually add Components: <component>. You also need to add its shortcuts and [Run] entries by yourself in a custom section, since the executable won't be found anymore by CPACK_PACKAGE_EXECUTABLES. Here's another example (Note: You've to go around the escaping problem for the example to work): set(CPACK_INNOSETUP_CUSTOM_INSTALL_INSTRUCTIONS
set(CPACK_INNOSETUP_MENU_LINKS
Components Specific VariablesThe generator supports components and also downloaded components. However, there are some features of components that aren't supported yet (especially component dependencies). These variables are ignored for now. CPack will change a component's name in Inno Setup if it has a parent group for technical reasons. Consider using group\component as component name in Inno Setup scripts if you have the component component and its parent group group. Here are some additional variables for components:
Compilation and Scripting Specific Variables
# The following line emulates: #define public MyMacro "Hello, World!" set(CPACK_INNOSETUP_DEFINE_MyMacro "Hello, World!") At this point, you can use MyMacro anywhere. For example in the following extra script: AppComments={#emit "'My Macro' has the value: " + MyMacro} Take care of the escaping problem.
CPack IFW GeneratorNew in version 3.1. Configure and run the Qt Installer Framework to generate a Qt installer. OverviewThis cpack generator generates configuration and meta information for the Qt Installer Framework (QtIFW), and runs QtIFW tools to generate a Qt installer. QtIFW provides tools and utilities to create installers for the platforms supported by Qt: Linux, Microsoft Windows, and macOS. To make use of this generator, QtIFW needs to be installed. The CPackIFW module looks for the location of the QtIFW command-line utilities, and defines several commands to control the behavior of this generator. See Hints for Finding QtIFW. VariablesYou can use the following variables to change the behavior of the CPack IFW generator. Debug
Package
NOTE: If the Qt Installer Framework tools were built without
libarchive support, only 7z format is supported.
This feature is available for QtIFW 4.2.0 and later.
If this variable is not set, QtIFW will use a default compression level, which will typically be 5 (Normal compression). NOTE: Some formats do not support all the possible values. For
example zip compression only supports values from 1 to 7.
This feature is available for QtIFW 4.2.0 and later. Components
QtIFW Tools
The following variables provide the locations of the QtIFW command-line tools as discovered by the CPackIFW module. These variables are cached, and may be configured if needed.
Hints for Finding QtIFWGenerally, the CPack IFW generator automatically finds QtIFW tools. The following (in order of precedence) can also be set to augment the locations normally searched by find_program():
NOTE: The specified path should not contain bin at the
end (for example: D:\\DevTools\\QtIFW2.0.5).
Other SettingsOnline installerBy default, this generator generates an offline installer. This means that all packaged files are fully contained in the installer executable. In contrast, an online installer will download some or all components from a remote server. The DOWNLOADED option in the cpack_add_component() command specifies that a component is to be downloaded. Alternatively, the ALL option in the cpack_configure_downloads() command specifies that all components are to be be downloaded. The cpack_ifw_add_repository() command and the CPACK_IFW_DOWNLOAD_ALL variable allow for more specific configuration. When there are online components, CPack will write them to archive files. The help page of the CPackComponent module, especially the section on the cpack_configure_downloads() function, explains how to make these files accessible from a download URL. InternationalizationNew in version 3.9. Some variables and command arguments support internationalization via CMake script. This is an optional feature. Installers created by QtIFW tools have built-in support for internationalization and many phrases are localized to many languages, but this does not apply to the description of your components and groups. Localization of the description of your components and groups is useful for users of your installers. A localized variable or argument can contain a single default value, and after that a set of pairs with the name of the locale and the localized value. For example: set(LOCALIZABLE_VARIABLE "Default value" See AlsoQt Installer Framework Manual:
CPack NSIS GeneratorCPack Nullsoft Scriptable Install System (NSIS) generator specific options. Changed in version 3.22: The NSIS generator requires NSIS 3.03 or newer. Variables specific to CPack NSIS generatorThe following variables are specific to the graphical installers built on Windows Nullsoft Scriptable Install System.
set(CPACK_NSIS_MENU_LINKS
makensis.exe <preArgs>... "nsisFileName.nsi" <postArgs>... where <preArgs>... is constructed from CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS and <postArgs>... is constructed from CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS.
makensis.exe <preArgs>... "nsisFileName.nsi" <postArgs>... where <preArgs>... is constructed from CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS and <postArgs>... is constructed from CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS. CPack NuGet GeneratorNew in version 3.12. When build a NuGet package there is no direct way to control an output filename due a lack of the corresponding CLI option of NuGet, so there is no CPACK_NUGET_PACKAGE_FILE_NAME variable. To form the output filename NuGet uses the package name and the version according to its built-in rules. Also, be aware that including a top level directory (CPACK_INCLUDE_TOPLEVEL_DIRECTORY) is ignored by this generator. Variables specific to CPack NuGet generatorThe CPack NuGet generator may be used to create NuGet packages using CPack. The CPack NuGet generator is a CPack generator thus it uses the CPACK_XXX variables used by CPack. The CPack NuGet generator has specific features which are controlled by the specifics CPACK_NUGET_XXX variables. In the "one per group" mode (see CPACK_COMPONENTS_GROUPING), <compName> placeholder in the variables below would contain a group name (uppercased and turned into a "C" identifier). List of CPack NuGet generator specific variables:
Required metadata variables
Optional metadata variables
New in version 3.30.
Repository metadata allows you to map the *.nupkg to the repository that built it. This should be a publicly available URL that can be invoked directly by a version control software. It should not be an HTML page as this is meant for the computer. New in version 3.30.
A type of the VCS repository. When uploading a package to nuget.org, the type is limited to 100 characters. New in version 3.30.
A VSC branch name to build the package. New in version 3.30.
A SHA-1 hash of the commit to build the package.
Dependencies specification
Example usageset(CPACK_GENERATOR NuGet) # Set up package metadata set(CPACK_PACKAGE_NAME SamplePackage) set(CPACK_PACKAGE_VERSION "1.0.0") set(CPACK_PACKAGE_VENDOR "Example Inc") set(CPACK_NUGET_PACKAGE_AUTHORS "ExampleInc") set(CPACK_PACKAGE_DESCRIPTION "A .NET wrapper around the foobar library for frobbling bratchens") set(CPACK_PACKAGE_HOMEPAGE_URL "https://www.example.com") set(CPACK_NUGET_PACKAGE_REPOSITORY_URL "https://github.com/example/libfoobar.git") set(CPACK_NUGET_PACKAGE_REPOSITORY_TYPE git) set(CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION "MIT") # Set up dependencies set(CPACK_NUGET_PACKAGE_TFMS "net4;net6.0") set(CPACK_NUGET_PACKAGE_DEPENDENCIES_net4 "Foo;Bar") # NB: If a version number is omitted, the dependency will not be created set(CPACK_NUGET_PACKAGE_DEPENDENCIES_net4_Foo_VERSION "1.23") set(CPACK_NUGET_PACKAGE_DEPENDENCIES_net4_Bar_VERSION "4.3.2") # NB: General dependencies (not framework-specific) go in this variable set(CPACK_NUGET_PACKAGE_DEPENDENCIES "Baz") set(CPACK_NUGET_PACKAGE_DEPENDENCIES_Baz_VERSION "9.8.6") # NB: Since "net6.0" was listed but no dependencies have been specified, an empty group # will be added to the nuspec file for this framework. This can be used to address warning NU5128. include(CPack) CPack PackageMaker GeneratorRemoved. This once generated PackageMaker installers, but the generator has been removed since CMake 3.24. Xcode no longer distributes the PackageMaker tools. Use the CPack productbuild Generator instead. CPack productbuild GeneratorNew in version 3.7. productbuild CPack generator (macOS). Variables specific to CPack productbuild generatorThe following variable is specific to installers built on Mac macOS using ProductBuild:
<domains enable_anywhere="true" enable_currentUserHome="false" enable_localSystem="true"/> The default values are as shown above, but can be overridden with CPACK_PRODUCTBUILD_DOMAINS_ANYWHERE, CPACK_PRODUCTBUILD_DOMAINS_USER, and CPACK_PRODUCTBUILD_DOMAINS_ROOT.
CPACK_PRODUCTBUILD_DOMAINS must be set to true for this variable to have any effect.
Background ImageNew in version 3.17. This group of variables controls the background image of the generated installer.
Distribution XML TemplateCPack uses a template file to generate the distribution.dist file used internally by this package generator. Ordinarily, CMake provides the template file, but projects may supply their own by placing a file called CPack.distribution.dist.in in one of the directories listed in the CMAKE_MODULE_PATH variable. CPack will then pick up the project's template file instead of using its own. The distribution.dist file is generated by performing substitutions similar to the configure_file() command. Any variable set when CPack runs will be available for substitution using the usual @...@ form. The following variables are also set internally and made available for substitution:
CPack RPM GeneratorThe built in (binary) CPack RPM generator (Unix only) Variables specific to CPack RPM generatorThe CPack RPM generator may be used to create RPM packages using CPack. The CPack RPM generator is a CPack generator thus it uses the CPACK_XXX variables used by CPack. The CPack RPM generator has specific features which are controlled by the specifics CPACK_RPM_XXX variables. CPACK_RPM_<COMPONENT>_XXXX variables may be used in order to have component-specific values. Note however that <COMPONENT> refers to the grouping name written in upper case. It may be either a component name or a component GROUP name. Usually, those variables correspond to RPM spec file entities. One may find information about spec files here https://rpm.org/documentation. Changed in version 3.6: <COMPONENT> part of variables is preferred to be in upper case (e.g. if component is named foo then use CPACK_RPM_FOO_XXXX variable name format) as is with other CPACK_<COMPONENT>_XXXX variables. For the purposes of back compatibility (CMake/CPack version 3.5 and lower) support for same cased component (e.g. fOo would be used as CPACK_RPM_fOo_XXXX) is still supported for variables defined in older versions of CMake/CPack but is not guaranteed for variables that will be added in the future. For the sake of back compatibility same cased component variables also override upper cased versions where both are present. Here are some CPack RPM generator wiki resources that are here for historic reasons and are no longer maintained but may still prove useful:
List of CPack RPM generator specific variables:
If enabled (ON) multiple packages are generated. By default a single package containing files of all components is generated.
New in version 3.2: Per-component CPACK_RPM_<component>_PACKAGE_SUMMARY variables.
New in version 3.5: Per-component CPACK_RPM_<component>_PACKAGE_NAME variables.
This may be set to:
NOTE: By using user provided spec file, rpm macro extensions
such as for generating debuginfo packages or by simply using multiple
components more than one rpm file may be generated, either from a single spec
file or from multiple spec files (each component execution produces its own
spec file). In such cases duplicate file names may occur as a result of this
variable setting or spec file content structure. Duplicate files get
overwritten and it is up to the packager to set the variables in a manner that
will prevent such errors.
This variable can be set to any component or group name so that component or group rpm package is generated without component suffix in filename and package name.
Optional number that should be incremented when changing versioning schemas or fixing mistakes in the version numbers of older packages.
This may be set to noarch if you know you are building a noarch package. New in version 3.3: Per-component CPACK_RPM_<component>_PACKAGE_ARCHITECTURE variables.
This is the numbering of the RPM package itself, i.e. the version of the packaging and not the version of the content (see CPACK_RPM_PACKAGE_VERSION). One may change the default value if the previous packaging was buggy and/or you want to put here a fancy Linux distro specific numbering. NOTE: This is the string that goes into the RPM Release:
field. Some distros (e.g. Fedora, CentOS) require 1%{?dist} format and
not just a number. %{?dist} part can be added by setting
CPACK_RPM_PACKAGE_RELEASE_DIST.
This is the reported %{dist} tag from the current distribution or empty %{dist} if RPM macro is not set. If this variable is set then RPM Release: field value is set to ${CPACK_RPM_PACKAGE_RELEASE}%{?dist}.
New in version 3.5: Per-component CPACK_RPM_<component>_PACKAGE_GROUP variables.
New in version 3.12: The CMAKE_PROJECT_HOMEPAGE_URL variable.
New in version 3.2: Per-component CPACK_RPM_<component>_PACKAGE_DESCRIPTION variables.
May be used to override RPM compression type to be used to build the RPM. For example some Linux distributions default to xz or zstd. Using this, one can specify a specific compression type to be used. Possible values are:
May be used to enable (1, yes) or disable (0, no) automatic shared libraries dependency detection. Dependencies are added to requires list. NOTE: By default automatic dependency detection is enabled by
rpm generator.
May be used to enable (1, yes) or disable (0, no) automatic listing of shared libraries that are provided by the package. Shared libraries are added to provides list. NOTE: By default automatic provides detection is enabled by rpm
generator.
Variable enables/disables autoreq and autoprov at the same time. See CPACK_RPM_PACKAGE_AUTOREQ and CPACK_RPM_PACKAGE_AUTOPROV for more details. NOTE: By default automatic detection feature is enabled by
rpm.
May be used to set RPM dependencies (requires). Note that you must enclose the complete requires string between quotes, for example: set(CPACK_RPM_PACKAGE_REQUIRES "python >= 2.5.0, cmake >= 2.8") The required package list of an RPM file could be printed with: rpm -qp --requires file.rpm
May be used to set negative RPM dependencies (conflicts). Note that you must enclose the complete requires string between quotes, for example: set(CPACK_RPM_PACKAGE_CONFLICTS "libxml2") The conflicting package list of an RPM file could be printed with: rpm -qp --conflicts file.rpm
May be used to set RPM preinstall dependencies (requires(pre)). Note that you must enclose the complete requires string between quotes, for example: set(CPACK_RPM_PACKAGE_REQUIRES_PRE "shadow-utils, initscripts")
May be used to set RPM postinstall dependencies (requires(post)). Note that you must enclose the complete requires string between quotes, for example: set(CPACK_RPM_PACKAGE_REQUIRES_POST "shadow-utils, initscripts")
May be used to set RPM postuninstall dependencies (requires(postun)). Note that you must enclose the complete requires string between quotes, for example: set(CPACK_RPM_PACKAGE_REQUIRES_POSTUN "shadow-utils, initscripts")
May be used to set RPM preuninstall dependencies (requires(preun)). Note that you must enclose the complete requires string between quotes, for example: set(CPACK_RPM_PACKAGE_REQUIRES_PREUN "shadow-utils, initscripts")
May be used to set weak RPM dependencies (suggests). If rpmbuild doesn't support the Suggests tag, CPack will emit a warning and ignore this variable. Note that you must enclose the complete requires string between quotes.
May be used to set RPM dependencies (provides). The provided package list of an RPM file could be printed with: rpm -qp --provides file.rpm
May be used to set RPM packages that are obsoleted by this one.
If this variable is set to TRUE or ON, the CPack RPM generator will try to build a relocatable RPM package. A relocatable RPM may be installed using: rpm --prefix or --relocate in order to install it at an alternate place see rpm(8). Note that currently this may fail if CPACK_SET_DESTDIR is set to ON. If CPACK_SET_DESTDIR is set then you will get a warning message but if there is file installed with absolute path you'll get unexpected behavior.
May be used to override the __spec_install_post section within the generated spec file. This affects the install step during package creation, not during package installation. For adding operations to be performed during package installation, use CPACK_RPM_POST_INSTALL_SCRIPT_FILE instead.
May be used to add any %define lines to the generated spec file. An example of its use is to prevent stripping of executables (but note that this may also disable other default post install processing): set(CPACK_RPM_SPEC_MORE_DEFINE "%define __spec_install_post /bin/true")
May be set when invoking cpack in order to trace debug information during CPack RPM run. For example you may launch CPack like this: cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
May be set by the user in order to specify a USER binary spec file to be used by the CPack RPM generator instead of generating the file. The specified file will be processed by configure_file( @ONLY).
If set CPack will generate a template for USER specified binary spec file and stop with an error. For example launch CPack like this: cpack -D CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE=1 -G RPM The user may then use this file in order to hand-craft is own binary spec file which may be used with CPACK_RPM_USER_BINARY_SPECFILE.
May be used to embed a pre installation/uninstallation/transaction script in the spec file. The referred script file (or both) will be read and directly put after the %pre or %preun section If CPACK_RPM_COMPONENT_INSTALL is set to ON the install/uninstall/transaction script for each component can be overridden with CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE, CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE, and CPACK_RPM_<COMPONENT>_PRE_TRANS_SCRIPT_FILE One may verify which scriptlet has been included with: rpm -qp --scripts package.rpm New in version 3.18: The CPACK_RPM_PRE_TRANS_SCRIPT_FILE variable.
May be used to embed a post installation/uninstallation/transaction script in the spec file. The referred script file (or both) will be read and directly put after the %post or %postun section. If CPACK_RPM_COMPONENT_INSTALL is set to ON the install/uninstall/transaction script for each component can be overridden with CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE, CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE, and CPACK_RPM_<COMPONENT>_POST_TRANS_SCRIPT_FILE One may verify which scriptlet has been included with: rpm -qp --scripts package.rpm New in version 3.18: The CPACK_RPM_POST_TRANS_SCRIPT_FILE variable. May be used to explicitly specify %(<directive>) file line in the spec file. Like %config(noreplace) or any other directive that be found in the %files section. Since the CPack RPM generator is generating the list of files (and directories) the user specified files of the CPACK_RPM_<COMPONENT>_USER_FILELIST list will be removed from the generated list. If referring to directories do not add a trailing slash. New in version 3.8: You can have multiple directives per line, as in %attr(600,root,root) %config(noreplace).
May be used to embed a changelog in the spec file. The referred file will be read and directly put after the %changelog section.
May be used to exclude path (directories or files) from the auto-generated list of paths discovered by CPack RPM. The default value contains a reasonable set of values if the variable is not defined by the user. If the variable is defined by the user then the CPack RPM generator will NOT any of the default path. If you want to add some path to the default list then you can use CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION variable. New in version 3.10: Added /usr/share/aclocal to the default list of excludes.
May be used to add more exclude path (directories or files) from the initial default list of excluded paths. See CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST.
May be used to specify more than one relocation path per relocatable RPM. Variable contains a list of relocation paths that if relative are prefixed by the value of CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX or by the value of CPACK_PACKAGING_INSTALL_PREFIX if the component version is not provided. Variable is not component based as its content can be used to set a different path prefix for e.g. binary dir and documentation dir at the same time. Only prefixes that are required by a certain component are added to that component - component must contain at least one file/directory/symbolic link with CPACK_RPM_RELOCATION_PATHS prefix for a certain relocation path to be added. Package will not contain any relocation paths if there are no files/directories/symbolic links on any of the provided prefix locations. Packages that either do not contain any relocation paths or contain files/directories/symbolic links that are outside relocation paths print out an AUTHOR_WARNING that RPM will be partially relocatable.
May be used to set per component CPACK_PACKAGING_INSTALL_PREFIX for relocatable RPM packages.
May be used to remove CPACK_PACKAGING_INSTALL_PREFIX and CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX from relocatable RPM prefix paths.
May be used to set additional man dirs that could potentially be compressed by brp-compress RPM macro. Variable content must be a list of regular expressions that point to directories containing man files or to man files directly. Note that in order to compress man pages a path must also be present in brp-compress RPM script and that brp-compress script must be added to RPM configuration by the operating system.
Value should be user name and not UID. Note that <compName> must be in upper-case.
Value should be group name and not GID. Note that <compName> must be in upper-case.
Accepted values are lists with PERMISSIONS. Valid permissions are:
Note that <compName> must be in upper-case.
Accepted values are lists with PERMISSIONS. Valid permissions are the same as for CPACK_RPM_DEFAULT_FILE_PERMISSIONS. Note that <compName> must be in upper-case.
Force set owner, group and world execute permissions on programs and shared libraries. This can be used for creating valid rpm packages on systems such as Debian where shared libraries do not have execute permissions set. NOTE: Programs and shared libraries without execute permissions
are ignored during separation of debug symbols from the binary for debuginfo
packages.
Packaging of Symbolic LinksNew in version 3.3. The CPack RPM generator supports packaging of symbolic links: execute_process(COMMAND ${CMAKE_COMMAND} Symbolic links will be optimized (paths will be shortened if possible) before being added to the package or if multiple relocation paths are detected, a post install symlink relocation script will be generated. Symbolic links may point to locations that are not packaged by the same package (either a different component or even not packaged at all) but those locations will be treated as if they were a part of the package while determining if symlink should be either created or present in a post install script - depending on relocation paths. Changed in version 3.6: Symbolic links that point to locations outside packaging path produce a warning and are treated as non relocatable permanent symbolic links. Previous versions of CMake produced an error in this case. Currently there are a few limitations though:
Packaging of debug informationNew in version 3.7. Debuginfo packages contain debug symbols and sources for debugging packaged binaries. Debuginfo RPM packaging has its own set of variables:
NOTE: Binaries must contain debug symbols before packaging so
use either Debug or RelWithDebInfo for CMAKE_BUILD_TYPE
variable value.
Additionally, if CPACK_STRIP_FILES is set, the files will be stripped before they get to the RPM generator, so will not contain debug symbols and a debuginfo package will not get built. Do not use with CPACK_STRIP_FILES. NOTE: Packages generated from packages without binary files,
with binary files but without execute permissions or without debug symbols
will cause packaging termination.
NOTE: For CMake project CPACK_BUILD_SOURCE_DIRS is set
by default to point to CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR
paths.
NOTE: Sources with path prefixes that do not fall under any
location provided with CPACK_BUILD_SOURCE_DIRS will not be present in
debuginfo package.
NOTE: Each source path prefix is additionally suffixed by
src_<index> where index is index of the path used from
CPACK_BUILD_SOURCE_DIRS variable. This produces
${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_<index> replacement
path. Limitation is that replaced path part must be shorter or of equal length
than the length of its replacement. If that is not the case either
CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX variable has to be set to a shorter
path or source directories must be placed on a longer path.
Listed paths are owned by other RPM packages and should therefore not be deleted on debuginfo package uninstallation.
When this variable is enabled it produces a single debuginfo package even if component packaging is enabled. When using this feature in combination with components packaging and there is more than one component this variable requires CPACK_RPM_MAIN_COMPONENT to be set. NOTE: If none of the
CPACK_RPM_<component>_DEBUGINFO_PACKAGE variables is set then
CPACK_RPM_DEBUGINFO_PACKAGE is automatically set to ON when
CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE is set.
Alternatively provided debuginfo package file name must end with .rpm suffix and should differ from file names of other generated packages. Variable may contain @cpack_component@ placeholder which will be replaced by component name if component packaging is enabled otherwise it deletes the placeholder. Setting the variable to RPM-DEFAULT may be used to explicitly set filename generation to default. NOTE: CPACK_RPM_FILE_NAME also supports rpmbuild tool
generated package file name - disabled by default but can be enabled by
setting the variable to RPM-DEFAULT.
Packaging of sources (SRPM)New in version 3.7. SRPM packaging is enabled by setting CPACK_RPM_PACKAGE_SOURCES variable while usually using CPACK_INSTALLED_DIRECTORIES variable to provide directory containing CMakeLists.txt and source files. For CMake projects SRPM package would be produced by executing: cpack -G RPM --config ./CPackSourceConfig.cmake NOTE: Produced SRPM package is expected to be built with
cmake(1) executable and packaged with cpack(1) executable so
CMakeLists.txt has to be located in root source directory and must be able to
generate binary rpm packages by executing cpack -G command. The two
executables as well as rpmbuild must also be present when generating binary
rpm packages from the produced SRPM package.
Once the SRPM package is generated it can be used to generate binary packages by creating a directory structure for rpm generation and executing rpmbuild tool: mkdir -p build_dir/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} rpmbuild --define "_topdir <path_to_build_dir>" --rebuild <SRPM_file_name> Generated packages will be located in build_dir/RPMS directory or its sub directories. NOTE: SRPM package internally uses CPack/RPM generator to
generate binary packages so CMakeScripts.txt can decide during the SRPM to
binary rpm generation step what content the package(s) should have as well as
how they should be packaged (monolithic or components). CMake can decide this
for e.g. by reading environment variables set by the package manager before
starting the process of generating binary rpm packages. This way a single SRPM
package can be used to produce different binary rpm packages on different
platforms depending on the platform's packaging rules.
Source RPM packaging has its own set of variables:
NOTE: For cmake projects CPACK_RPM_PACKAGE_SOURCES
variable is set to OFF in CPackConfig.cmake and ON in
CPackSourceConfig.cmake generated files.
May be used to set source RPM build dependencies (BuildRequires). Note that you must enclose the complete build requirements string between quotes, for example: set(CPACK_RPM_BUILDREQUIRES "python >= 2.5.0, cmake >= 2.8")
May be used to keep the dependency generator from scanning specific files or directories for dependencies. Note that you can use a regular expression that matches all of the directories or files, for example: set(CPACK_RPM_REQUIRES_EXCLUDE_FROM "bin/libqsqloci.*\\.so.*") CPack WIX GeneratorUse the WiX Toolset to produce a Windows Installer .msi database. New in version 3.7: The CPACK_COMPONENT_<compName>_DISABLED variable is now supported. WiX ToolsetsCPack selects one of the following variants of the WiX Toolset based on the CPACK_WIX_VERSION variable:
WiX .NET ToolsPackaging is performed using the following tools:
WiX extensions must be named with the form WixToolset.<Name>.wixext. CPack expects the wix .NET tool to be available for command-line use with any required WiX extensions already installed. Be sure the wix version is compatible with CPACK_WIX_VERSION, and that WiX extension versions match the wix tool version. For example:
To install wix globally for the current user:
dotnet tool install --global wix --version 4.0.4 This places wix.exe in %USERPROFILE%\.dotnet\tools and adds the directory to the current user's PATH environment variable. Or, to install wix in a specific path, e.g., in c:\WiX: dotnet tool install --tool-path c:\WiX wix --version 4.0.4 This places wix.exe in c:\WiX, but does not add it to the current user's PATH environment variable. The WIX environment variable may be set to tell CPack where to find the tool, e.g., set WIX=c:\WiX.
wix extension add --global WixToolset.UI.wixext/4.0.4 Extensions added globally are stored in %USERPROFILE%\.wix, or if the WIX_EXTENSIONS environment variable is set, in %WIX_EXTENSIONS%\.wix. WiX Toolset v3Packaging is performed using the following tools:
CPack invokes both tools as needed. Intermediate .wixobj files are considered implementation details. WiX extensions must be named with the form Wix<Name>Extension. CPack expects the above tools to be available for command-line use via the PATH. Or, if the WIX environment variable is set, CPack looks for the tools in %WIX% and %WIX%\bin. Variables specific to CPack WIX generatorThe following variables are specific to the installers built on Windows using WiX.
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX (each X represents an uppercase hexadecimal digit)
The default is WixUI_InstallDir in case no CPack components have been defined and WixUI_FeatureTree otherwise.
start = CPackWiXPatch CPackWiXPatch = element CPackWiXPatch { CPackWiXFragment* } CPackWiXFragment = element CPackWiXFragment { Currently fragments can be injected into most Component, File, Directory and Feature elements. New in version 3.3: The following additional special Ids can be used:
New in version 3.7: Support patching arbitrary <Feature> elements. New in version 3.9: Allow setting additional attributes. The following example illustrates how this works. Given that the WIX generator creates the following XML element: <Component Id="CM_CP_applications.bin.my_libapp.exe" Guid="*"/> The following XML patch file may be used to inject an Environment element into it: <CPackWiXPatch>
NOTE: Installers created with this feature do not take
differences between the system on which the installer is created and the
system on which the installer might be used into account.
It is therefore possible that the installer e.g. might try to install onto a drive that is unavailable or unintended or a path that does not follow the localization or convention of the system on which the installation is performed.
An installation performed by an installer created without
any InstallScope cannot be cleanly updated or replaced by an installer
with an InstallScope. In order to transition a project's installers
from NONE to perMachine, the latter installer should be
distributed with instructions to first manually uninstall any older
version.
See https://wixtoolset.org/docs/v3/xsd/wix/package/ COPYRIGHT2000-2024 Kitware, Inc. and Contributors
|