code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CPack RPM Generator — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CPack WIX Generator" href="wix.html" />
    <link rel="prev" title="CPack productbuild Generator" href="productbuild.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cpack-generators(7) »

CPack RPM Generator

CPack RPM Generator¶

The built in (binary) CPack RPM generator (Unix only)

Variables specific to CPack RPM generator¶

The 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:

https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/Configuration

https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/PackageGenerators#rpm-unix-only

List of CPack RPM generator specific variables:

CPACK_RPM_COMPONENT_INSTALL¶

Enable component packaging for CPack RPM generator

Mandatory:

No

Default:

OFF

If enabled (ON) multiple packages are generated. By default
a single package containing files of all components is generated.

CPACK_RPM_PACKAGE_SUMMARY¶

CPACK_RPM_<component>_PACKAGE_SUMMARY<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_SUMMARY" title="Permalink to this definition">¶

The RPM package summary.

Mandatory:

Yes

Default:

CPACK_PACKAGE_DESCRIPTION_SUMMARY

New in version 3.2: Per-component CPACK_RPM_<component>_PACKAGE_SUMMARY variables.

CPACK_RPM_PACKAGE_NAME¶

CPACK_RPM_<component>_PACKAGE_NAME<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_NAME" title="Permalink to this definition">¶

The RPM package name.

Mandatory:

Yes

Default:

CPACK_PACKAGE_NAME

New in version 3.5: Per-component CPACK_RPM_<component>_PACKAGE_NAME variables.

CPACK_RPM_FILE_NAME¶

CPACK_RPM_<component>_FILE_NAME<a class="headerlink" href="#variable:CPACK_RPM_<component>_FILE_NAME" title="Permalink to this definition">¶

New in version 3.6.

Package file name.

Mandatory:

Yes

Default:

<CPACK_PACKAGE_FILE_NAME>[-<component>].rpm with spaces
replaced by '-'

This may be set to:

RPM-DEFAULT

Tell rpmbuild to automatically generate the package file name.

<file-name>[.rpm]

Use the given file name.

Changed in version 3.29: The .rpm suffix will be automatically added if missing.
Previously the suffix was required.

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.

CPACK_RPM_MAIN_COMPONENT¶

New in version 3.8.

Main component that is packaged without component suffix.

Mandatory:

No

Default:

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.

CPACK_RPM_PACKAGE_EPOCH¶

New in version 3.10.

The RPM package epoch

Mandatory:

No

Default:

Optional number that should be incremented when changing versioning schemas
or fixing mistakes in the version numbers of older packages.

CPACK_RPM_PACKAGE_VERSION¶

The RPM package version.

Mandatory:

Yes

Default:

CPACK_PACKAGE_VERSION

CPACK_RPM_PACKAGE_ARCHITECTURE¶

CPACK_RPM_<component>_PACKAGE_ARCHITECTURE<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_ARCHITECTURE" title="Permalink to this definition">¶

The RPM package architecture.

Mandatory:

Yes

Default:

Native architecture output by uname -m

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.

CPACK_RPM_PACKAGE_RELEASE¶

The RPM package release.

Mandatory:

Yes

Default:

1

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.

CPACK_RPM_PACKAGE_RELEASE_DIST¶

New in version 3.6.

The dist tag that is added  RPM Release: field.

Mandatory:

No

Default:

OFF

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}.

CPACK_RPM_PACKAGE_LICENSE¶

The RPM package license policy.

Mandatory:

Yes

Default:

"unknown"

CPACK_RPM_PACKAGE_GROUP¶

CPACK_RPM_<component>_PACKAGE_GROUP<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_GROUP" title="Permalink to this definition">¶

The RPM package group.

Mandatory:

Yes

Default:

"unknown"

New in version 3.5: Per-component CPACK_RPM_<component>_PACKAGE_GROUP variables.

CPACK_RPM_PACKAGE_VENDOR¶

The RPM package vendor.

Mandatory:

Yes

Default:

CPACK_PACKAGE_VENDOR if set or "unknown"

CPACK_RPM_PACKAGE_URL¶

CPACK_RPM_<component>_PACKAGE_URL<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_URL" title="Permalink to this definition">¶

The projects URL.

Mandatory:

No

Default:

CMAKE_PROJECT_HOMEPAGE_URL

New in version 3.12: The CMAKE_PROJECT_HOMEPAGE_URL variable.

CPACK_RPM_PACKAGE_DESCRIPTION¶

CPACK_RPM_<component>_PACKAGE_DESCRIPTION<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_DESCRIPTION" title="Permalink to this definition">¶

RPM package description.

Mandatory:

Yes

Default:

CPACK_COMPONENT_<compName>_DESCRIPTION
(component based installers only) if set,

CPACK_PACKAGE_DESCRIPTION_FILE
if set, or

no package description available

New in version 3.2: Per-component CPACK_RPM_<component>_PACKAGE_DESCRIPTION variables.

CPACK_RPM_COMPRESSION_TYPE¶

RPM compression type.

Mandatory:

No

Default:

(system default)

May be used to override RPM compression type to be used to build the
RPM. For example some Linux distribution now default to lzma or xz
compression whereas older cannot use such RPM. Using this one can enforce
compression type to be used.

Possible values are:

lzma

Lempel–Ziv–Markov chain algorithm

xz

XZ Utils compression

bzip2

bzip2 Burrows–Wheeler algorithm

gzip

GNU Gzip compression

CPACK_RPM_PACKAGE_AUTOREQ¶

CPACK_RPM_<component>_PACKAGE_AUTOREQ<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_AUTOREQ" title="Permalink to this definition">¶

RPM spec autoreq field.

Mandatory:

No

Default:

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.

CPACK_RPM_PACKAGE_AUTOPROV¶

CPACK_RPM_<component>_PACKAGE_AUTOPROV<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_AUTOPROV" title="Permalink to this definition">¶

RPM spec autoprov field.

Mandatory:

No

Default:

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.

CPACK_RPM_PACKAGE_AUTOREQPROV¶

CPACK_RPM_<component>_PACKAGE_AUTOREQPROV<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_AUTOREQPROV" title="Permalink to this definition">¶

RPM spec autoreqprov field.

Mandatory:

No

Default:

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.

CPACK_RPM_PACKAGE_REQUIRES¶

CPACK_RPM_<component>_PACKAGE_REQUIRES<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_REQUIRES" title="Permalink to this definition">¶

RPM spec requires field.

Mandatory:

No

Default:

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

CPACK_RPM_PACKAGE_CONFLICTS¶

CPACK_RPM_<component>_PACKAGE_CONFLICTS<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_CONFLICTS" title="Permalink to this definition">¶

RPM spec conflicts field.

Mandatory:

No

Default:

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

CPACK_RPM_PACKAGE_REQUIRES_PRE¶

CPACK_RPM_<component>_PACKAGE_REQUIRES_PRE<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_REQUIRES_PRE" title="Permalink to this definition">¶

New in version 3.2.

RPM spec requires(pre) field.

Mandatory:

No

Default:

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")

CPACK_RPM_PACKAGE_REQUIRES_POST¶

CPACK_RPM_<component>_PACKAGE_REQUIRES_POST<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_REQUIRES_POST" title="Permalink to this definition">¶

New in version 3.2.

RPM spec requires(post) field.

Mandatory:

No

Default:

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")

CPACK_RPM_PACKAGE_REQUIRES_POSTUN¶

CPACK_RPM_<component>_PACKAGE_REQUIRES_POSTUN<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_REQUIRES_POSTUN" title="Permalink to this definition">¶

New in version 3.2.

RPM spec requires(postun) field.

Mandatory:

No

Default:

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")

CPACK_RPM_PACKAGE_REQUIRES_PREUN¶

CPACK_RPM_<component>_PACKAGE_REQUIRES_PREUN<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_REQUIRES_PREUN" title="Permalink to this definition">¶

New in version 3.2.

RPM spec requires(preun) field.

Mandatory:

No

Default:

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")

CPACK_RPM_PACKAGE_SUGGESTS¶

CPACK_RPM_<component>_PACKAGE_SUGGESTS<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_SUGGESTS" title="Permalink to this definition">¶

RPM spec suggest field.

Mandatory:

No

Default:

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.

CPACK_RPM_PACKAGE_PROVIDES¶

CPACK_RPM_<component>_PACKAGE_PROVIDES<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_PROVIDES" title="Permalink to this definition">¶

RPM spec provides field.

Mandatory:

No

Default:

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

CPACK_RPM_PACKAGE_OBSOLETES¶

CPACK_RPM_<component>_PACKAGE_OBSOLETES<a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_OBSOLETES" title="Permalink to this definition">¶

RPM spec obsoletes field.

Mandatory:

No

Default:

May be used to set RPM packages that are obsoleted by this one.

CPACK_RPM_PACKAGE_RELOCATABLE¶

build a relocatable RPM.

Mandatory:

No

Default:

CPACK_PACKAGE_RELOCATABLE

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.

CPACK_RPM_SPEC_INSTALL_POST¶

Deprecated since version 2.8.12: Use CPACK_RPM_SPEC_MORE_DEFINE instead.

Mandatory:

No

Default:

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.

CPACK_RPM_SPEC_MORE_DEFINE¶

RPM extended spec definitions lines.

Mandatory:

No

Default:

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")

CPACK_RPM_PACKAGE_DEBUG¶

Toggle CPack RPM generator debug output.

Mandatory:

No

Default:

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

CPACK_RPM_USER_BINARY_SPECFILE¶

CPACK_RPM_<componentName>_USER_BINARY_SPECFILE<a class="headerlink" href="#variable:CPACK_RPM_<componentName>_USER_BINARY_SPECFILE" title="Permalink to this definition">¶

A user provided spec file.

Mandatory:

No

Default:

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).

CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE¶

Spec file template.

Mandatory:

No

Default:

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.

CPACK_RPM_PRE_INSTALL_SCRIPT_FILE¶

CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE¶

CPACK_RPM_PRE_TRANS_SCRIPT_FILE¶

Path to file containing pre install/uninstall/transaction script.

Mandatory:

No

Default:

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.

CPACK_RPM_POST_INSTALL_SCRIPT_FILE¶

CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE¶

CPACK_RPM_POST_TRANS_SCRIPT_FILE¶

Path to file containing post install/uninstall/transaction script.

Mandatory:

No

Default:

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.

CPACK_RPM_USER_FILELIST¶

CPACK_RPM_<COMPONENT>_USER_FILELIST<a class="headerlink" href="#variable:CPACK_RPM_<COMPONENT>_USER_FILELIST" title="Permalink to this definition">¶

Mandatory:

No

Default:

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).

CPACK_RPM_CHANGELOG_FILE¶

RPM changelog file.

Mandatory:

No

Default:

May be used to embed a changelog in the spec file.
The referred file will be read and directly put after the %changelog
section.

CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST¶

list of path to be excluded.

Mandatory:

No

Default:

The following paths are excluded by default:

/etc

/etc/init.d

/usr

/usr/bin

/usr/include

/usr/lib

/usr/libx32

/usr/lib64

/usr/share

/usr/share/aclocal

/usr/share/doc

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.

CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION¶

additional list of path to be excluded.

Mandatory:

No

Default:

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.

CPACK_RPM_RELOCATION_PATHS¶

New in version 3.2.

Packages relocation paths list.

Mandatory:

No

Default:

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.

CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX<a class="headerlink" href="#variable:CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX" title="Permalink to this definition">¶

New in version 3.2.

Per component relocation path install prefix.

Mandatory:

No

Default:

CPACK_PACKAGING_INSTALL_PREFIX

May be used to set per component CPACK_PACKAGING_INSTALL_PREFIX
for relocatable RPM packages.

CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION¶

CPACK_RPM_NO_<COMPONENT>_INSTALL_PREFIX_RELOCATION<a class="headerlink" href="#variable:CPACK_RPM_NO_<COMPONENT>_INSTALL_PREFIX_RELOCATION" title="Permalink to this definition">¶

New in version 3.3.

Removal of default install prefix from relocation paths list.

Mandatory:

No

Default:

CPACK_PACKAGING_INSTALL_PREFIX or
CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX
are treated as one of relocation paths

May be used to remove CPACK_PACKAGING_INSTALL_PREFIX and
CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX
from relocatable RPM prefix paths.

CPACK_RPM_ADDITIONAL_MAN_DIRS¶

New in version 3.3.

Mandatory:

No

Default:

Regular expressions that are added by default were taken from brp-compress RPM macro:

/usr/man/man.*

/usr/man/.*/man.*

/usr/info.*

/usr/share/man/man.*

/usr/share/man/.*/man.*

/usr/share/info.*

/usr/kerberos/man.*

/usr/X11R6/man/man.*

/usr/lib/perl5/man/man.*

/usr/share/doc/.*/man/man.*

/usr/lib/.*/man/man.*

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.

CPACK_RPM_DEFAULT_USER¶

CPACK_RPM_<compName>_DEFAULT_USER<a class="headerlink" href="#variable:CPACK_RPM_<compName>_DEFAULT_USER" title="Permalink to this definition">¶

New in version 3.6.

default user ownership of RPM content

Mandatory:

No

Default:

root

Value should be user name and not UID.
Note that <compName> must be in upper-case.

CPACK_RPM_DEFAULT_GROUP¶

CPACK_RPM_<compName>_DEFAULT_GROUP<a class="headerlink" href="#variable:CPACK_RPM_<compName>_DEFAULT_GROUP" title="Permalink to this definition">¶

New in version 3.6.

default group ownership of RPM content

Mandatory:

No

Default:

root

Value should be group name and not GID.
Note that <compName> must be in upper-case.

CPACK_RPM_DEFAULT_FILE_PERMISSIONS¶

CPACK_RPM_<compName>_DEFAULT_FILE_PERMISSIONS<a class="headerlink" href="#variable:CPACK_RPM_<compName>_DEFAULT_FILE_PERMISSIONS" title="Permalink to this definition">¶

New in version 3.6.

default permissions used for packaged files

Mandatory:

No

Default:

(system default)

Accepted values are lists with PERMISSIONS. Valid permissions
are:

OWNER_READ

OWNER_WRITE

OWNER_EXECUTE

GROUP_READ

GROUP_WRITE

GROUP_EXECUTE

WORLD_READ

WORLD_WRITE

WORLD_EXECUTE

Note that <compName> must be in upper-case.

CPACK_RPM_DEFAULT_DIR_PERMISSIONS¶

CPACK_RPM_<compName>_DEFAULT_DIR_PERMISSIONS<a class="headerlink" href="#variable:CPACK_RPM_<compName>_DEFAULT_DIR_PERMISSIONS" title="Permalink to this definition">¶

New in version 3.6.

default permissions used for packaged directories

Mandatory:

No

Default:

(system default)

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.

CPACK_RPM_INSTALL_WITH_EXEC¶

New in version 3.11.

force execute permissions on programs and shared libraries

Mandatory:

No

Default:

(system default)

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 Links¶

New in version 3.3.

The CPack RPM generator supports packaging of symbolic links:

execute_process(COMMAND ${CMAKE_COMMAND}
  -E create_symlink <relative_path_location> <symlink_name>)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/<symlink_name>
  DESTINATION <symlink_location> COMPONENT libraries)

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:

For component based packaging component interdependency is not checked
when processing symbolic links. Symbolic links pointing to content of
a different component are treated the same way as if pointing to location
that will not be packaged.

Symbolic links pointing to a location through one or more intermediate
symbolic links will not be handled differently - if the intermediate
symbolic link(s) is also on a relocatable path, relocating it during
package installation may cause initial symbolic link to point to an
invalid location.

Packaging of debug information¶

New in version 3.7.

Debuginfo packages contain debug symbols and sources for debugging packaged
binaries.

Debuginfo RPM packaging has its own set of variables:

CPACK_RPM_DEBUGINFO_PACKAGE¶

CPACK_RPM_<component>_DEBUGINFO_PACKAGE<a class="headerlink" href="#variable:CPACK_RPM_<component>_DEBUGINFO_PACKAGE" title="Permalink to this definition">¶

Enable generation of debuginfo RPM package(s).

Mandatory:

No

Default:

OFF

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.

CPACK_BUILD_SOURCE_DIRS¶

Provides locations of root directories of source files from which binaries
were built.

Mandatory:

Yes if CPACK_RPM_DEBUGINFO_PACKAGE is set

Default:

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.

CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX¶

CPACK_RPM_<component>_BUILD_SOURCE_DIRS_PREFIX<a class="headerlink" href="#variable:CPACK_RPM_<component>_BUILD_SOURCE_DIRS_PREFIX" title="Permalink to this definition">¶

Prefix of location where sources will be placed during package installation.

Mandatory:

Yes if CPACK_RPM_DEBUGINFO_PACKAGE is set

Default:

/usr/src/debug/${CPACK_PACKAGE_FILE_NAME} and
for component packaging /usr/src/debug/${CPACK_PACKAGE_FILE_NAME}-<component>

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.

CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS¶

Directories containing sources that should be excluded from debuginfo packages.

Mandatory:

No

Default:

The following paths are excluded by default:

/usr

/usr/src

/usr/src/debug

Listed paths are owned by other RPM packages and should therefore not be
deleted on debuginfo package uninstallation.

CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS_ADDITION¶

Paths that should be appended to CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS
for exclusion.

Mandatory:

No

Default:

CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE¶

New in version 3.8.

Create a single debuginfo package even if components packaging is set.

Mandatory:

No

Default:

OFF

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.

CPACK_RPM_DEBUGINFO_FILE_NAME¶

CPACK_RPM_<component>_DEBUGINFO_FILE_NAME<a class="headerlink" href="#variable:CPACK_RPM_<component>_DEBUGINFO_FILE_NAME" title="Permalink to this definition">¶

New in version 3.9.

Debuginfo package file name.

Mandatory:

No

Default:

rpmbuild tool generated package file name

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:

CPACK_RPM_PACKAGE_SOURCES¶

Should the content be packaged as a source rpm (default is binary rpm).

Mandatory:

No

Default:

OFF

Note

For cmake projects CPACK_RPM_PACKAGE_SOURCES variable is set
to OFF in CPackConfig.cmake and ON in CPackSourceConfig.cmake
generated files.

CPACK_RPM_SOURCE_PKG_BUILD_PARAMS¶

Additional command-line parameters provided to cmake(1) executable.

Mandatory:

No

Default:

CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX¶

Packaging install prefix that would be provided in CPACK_PACKAGING_INSTALL_PREFIX
variable for producing binary RPM packages.

Mandatory:

Yes

Default:

/

CPACK_RPM_BUILDREQUIRES¶

List of source rpm build dependencies.

Mandatory:

No

Default:

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")

CPACK_RPM_REQUIRES_EXCLUDE_FROM¶

New in version 3.22.

Mandatory:

No

Default:

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.*")

Table of Contents

CPack RPM Generator

Variables specific to CPack RPM generator

Packaging of Symbolic Links

Packaging of debug information

Packaging of sources (SRPM)

Previous topic

CPack productbuild Generator

Next topic

CPack WIX Generator

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cpack-generators(7) »

CPack RPM Generator

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CPack WIX Generator — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMake Tutorial" href="../guide/tutorial/index.html" />
    <link rel="prev" title="CPack RPM Generator" href="rpm.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cpack-generators(7) »

CPack WIX Generator

CPack WIX Generator¶

CPack WIX generator specific options

New in version 3.7: Support CPACK_COMPONENT_<compName>_DISABLED variable.

Variables specific to CPack WIX generator¶

The following variables are specific to the installers built on
Windows using WiX.

CPACK_WIX_UPGRADE_GUID¶

Upgrade GUID (Product/@UpgradeCode)

Will be automatically generated unless explicitly provided.

It should be explicitly set to a constant generated globally unique
identifier (GUID) to allow your installers to replace existing
installations that use the same GUID.

You may for example explicitly set this variable in your
CMakeLists.txt to the value that has been generated per default.  You
should not use GUIDs that you did not generate yourself or which may
belong to other projects.

A GUID shall have the following fixed length syntax:

XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

(each X represents an uppercase hexadecimal digit)

CPACK_WIX_PRODUCT_GUID¶

Product GUID (Product/@Id)

Will be automatically generated unless explicitly provided.

If explicitly provided this will set the Product Id of your installer.

The installer will abort if it detects a pre-existing installation that
uses the same GUID.

The GUID shall use the syntax described for CPACK_WIX_UPGRADE_GUID.

CPACK_WIX_LICENSE_RTF¶

RTF License File

If CPACK_RESOURCE_FILE_LICENSE has an .rtf extension it is used as-is.

If CPACK_RESOURCE_FILE_LICENSE has an .txt extension it is implicitly
converted to RTF by the WIX Generator.
The expected encoding of the .txt file is UTF-8.

With CPACK_WIX_LICENSE_RTF you can override the license file used by the
WIX Generator in case CPACK_RESOURCE_FILE_LICENSE is in an unsupported
format or the .txt -> .rtf conversion does not work as expected.

CPACK_WIX_PRODUCT_ICON¶

The Icon shown next to the program name in Add/Remove programs.

If set, this icon is used in place of the default icon.

CPACK_WIX_UI_REF¶

This variable allows you to override the Id of the <UIRef> element
in the WiX template.

The default is WixUI_InstallDir in case no CPack components have
been defined and WixUI_FeatureTree otherwise.

CPACK_WIX_UI_BANNER¶

The bitmap will appear at the top of all installer pages other than the
welcome and completion dialogs.

If set, this image will replace the default banner image.

This image must be 493 by 58 pixels.

CPACK_WIX_UI_DIALOG¶

Background bitmap used on the welcome and completion dialogs.

If this variable is set, the installer will replace the default dialog
image.

This image must be 493 by 312 pixels.

CPACK_WIX_PROGRAM_MENU_FOLDER¶

Start menu folder name for launcher.

If this variable is not set, it will be initialized with CPACK_PACKAGE_NAME

New in version 3.16: If this variable is set to ., then application shortcuts will be
created directly in the start menu and the uninstaller shortcut will be
omitted.

CPACK_WIX_CULTURES¶

Language(s) of the installer

Languages are compiled into the WixUI extension library.  To use them,
simply provide the name of the culture.  If you specify more than one
culture identifier in a comma or semicolon delimited list, the first one
that is found will be used.  You can find a list of supported languages at:
https://wixtoolset.org/docs/v3/wixui/wixui_localization/

CPACK_WIX_TEMPLATE¶

Template file for WiX generation

If this variable is set, the specified template will be used to generate
the WiX wxs file.  This should be used if further customization of the
output is required. The template contents will override the effect of most
CPACK_WIX_ variables.

If this variable is not set, the default MSI template included with CMake
will be used.

CPACK_WIX_PATCH_FILE¶

Optional list of XML files with fragments to be inserted into
generated WiX sources.

New in version 3.5: Support listing multiple patch files.

This optional variable can be used to specify an XML file that the
WIX generator will use to inject fragments into its generated
source files.

Patch files understood by the CPack WIX generator
roughly follow this RELAX NG compact schema:

start = CPackWiXPatch

CPackWiXPatch = element CPackWiXPatch { CPackWiXFragment* }

CPackWiXFragment = element CPackWiXFragment
{
    attribute Id { string },
    fragmentContent*
}

fragmentContent = element * - CPackWiXFragment
{
    (attribute * { text } | text | fragmentContent)*
}

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:

#PRODUCT for the <Product> element.

#PRODUCTFEATURE for the root <Feature> element.

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>
  <CPackWiXFragment Id="CM_CP_applications.bin.my_libapp.exe">
    <Environment Id="MyEnvironment" Action="set"
      Name="MyVariableName" Value="MyVariableValue"/>
  </CPackWiXFragment>
</CPackWiXPatch>

CPACK_WIX_EXTRA_SOURCES¶

Extra WiX source files

This variable provides an optional list of extra WiX source files (.wxs)
that should be compiled and linked.  The full path to source files is
required.

CPACK_WIX_EXTRA_OBJECTS¶

Extra WiX object files or libraries

This variable provides an optional list of extra WiX object (.wixobj)
and/or WiX library (.wixlib) files.  The full path to objects and libraries
is required.

CPACK_WIX_EXTENSIONS¶

This variable provides a list of additional extensions for the WiX
tools light and candle.

CPACK_WIX_<TOOL>_EXTENSIONS<a class="headerlink" href="#variable:CPACK_WIX_<TOOL>_EXTENSIONS" title="Permalink to this definition">¶

This is the tool specific version of CPACK_WIX_EXTENSIONS.
<TOOL> can be either LIGHT or CANDLE.

CPACK_WIX_<TOOL>_EXTRA_FLAGS<a class="headerlink" href="#variable:CPACK_WIX_<TOOL>_EXTRA_FLAGS" title="Permalink to this definition">¶

This list variable allows you to pass additional
flags to the WiX tool <TOOL>.

Use it at your own risk.
Future versions of CPack may generate flags which may be in conflict
with your own flags.

<TOOL> can be either LIGHT or CANDLE.

CPACK_WIX_CMAKE_PACKAGE_REGISTRY¶

If this variable is set the generated installer will create
an entry in the windows registry key
HKEY_LOCAL_MACHINE\Software\Kitware\CMake\Packages\<PackageName>
The value for <PackageName> is provided by this variable.

Assuming you also install a CMake configuration file this will
allow other CMake projects to find your package with
the find_package() command.

CPACK_WIX_PROPERTY_<PROPERTY><a class="headerlink" href="#variable:CPACK_WIX_PROPERTY_<PROPERTY>" title="Permalink to this definition">¶

New in version 3.1.

This variable can be used to provide a value for
the Windows Installer property <PROPERTY>

The following list contains some example properties that can be used to
customize information under
"Programs and Features" (also known as "Add or Remove Programs")

ARPCOMMENTS - Comments

ARPHELPLINK - Help and support information URL

ARPURLINFOABOUT - General information URL

ARPURLUPDATEINFO - Update information URL

ARPHELPTELEPHONE - Help and support telephone number

ARPSIZE - Size (in kilobytes) of the application

CPACK_WIX_ROOT_FEATURE_TITLE¶

New in version 3.7.

Sets the name of the root install feature in the WIX installer. Same as
CPACK_COMPONENT_<compName>_DISPLAY_NAME for components.

CPACK_WIX_ROOT_FEATURE_DESCRIPTION¶

New in version 3.7.

Sets the description of the root install feature in the WIX installer. Same as
CPACK_COMPONENT_<compName>_DESCRIPTION for components.

CPACK_WIX_SKIP_PROGRAM_FOLDER¶

New in version 3.7.

If this variable is set to true, the default install location
of the generated package will be CPACK_PACKAGE_INSTALL_DIRECTORY directly.
The install location will not be located relatively below
ProgramFiles or ProgramFiles64.

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.

CPACK_WIX_ROOT_FOLDER_ID¶

New in version 3.9.

This variable allows specification of a custom root folder ID.
The generator specific <64> token can be used for
folder IDs that come in 32-bit and 64-bit variants.
In 32-bit builds the token will expand empty while in 64-bit builds
it will expand to 64.

When unset generated installers will default installing to
ProgramFiles<64>Folder.

CPACK_WIX_ROOT¶

This variable can optionally be set to the root directory
of a custom WiX Toolset installation.

When unspecified CPack will try to locate a WiX Toolset
installation via the WIX environment variable instead.

CPACK_WIX_CUSTOM_XMLNS¶

New in version 3.19.

This variable provides a list of custom namespace declarations that are necessary
for using WiX extensions. Each declaration should be in the form name=url, where
name is the plain namespace without the usual xmlns: prefix and url is an unquoted
namespace url. A list of commonly known WiX schemata can be found here:
https://wixtoolset.org/docs/v3/xsd/

CPACK_WIX_SKIP_WIX_UI_EXTENSION¶

New in version 3.23.

If this variable is set then the inclusion of WixUIExtensions is skipped,
i.e. the -ext "WixUIExtension" command line is not included during
the execution of the WiX light tool.

CPACK_WIX_ARCHITECTURE¶

New in version 3.24.

This variable can be optionally set to specify the target architecture
of the installer. May for example be set to x64 or arm64.

When unspecified, CPack will default to x64 or x86.

CPACK_WIX_INSTALL_SCOPE¶

New in version 3.29.

This variable can be optionally set to specify the InstallScope
of the installer:

perMachine (default)

Create an installer that installs for all users and requires
administrative privileges.  Start menu entries created by the
installer are visible to all users.

perUser

Not yet supported. This is reserved for future use.

NONE

Create an installer without any InstallScope attribute.

Deprecated since version 3.29: This value is only for compatibility with the inconsistent behavior used
by CPack 3.28 and older.  The resulting installer requires administrative
privileges and installs into the system-wide ProgramFiles directory,
but the start menu entry and uninstaller registration are created only
for the current user.

See https://wixtoolset.org/docs/v3/xsd/wix/package/

Table of Contents

CPack WIX Generator

Variables specific to CPack WIX generator

Previous topic

CPack RPM Generator

Next topic

CMake Tutorial

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cpack-generators(7) »

CPack WIX Generator

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.

repo_name: lazytadpole/codenamesilverfish

license: mit


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>ADSP_ROOT — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_APPLE_SILICON_PROCESSOR" href="CMAKE_APPLE_SILICON_PROCESSOR.html" />
    <link rel="prev" title="SSL_CERT_FILE" href="SSL_CERT_FILE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

ADSP_ROOT

ADSP_ROOT¶

New in version 3.24.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

The ADSP_ROOT environment variable specifies a default value
for the CMAKE_ADSP_ROOT variable when there is no explicit
configuration given on the first run while creating a new build tree.

Previous topic

SSL_CERT_FILE

Next topic

CMAKE_APPLE_SILICON_PROCESSOR

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

ADSP_ROOT

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>ASM<DIALECT> — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="ASM<DIALECT>FLAGS" href="ASM_DIALECTFLAGS.html" />
    <link rel="prev" title="VERBOSE" href="VERBOSE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

ASM<DIALECT>

<span id="envvar:ASM<DIALECT>">
ASM<DIALECT>¶

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

Preferred executable for compiling a specific dialect of assembly language
files. ASM<DIALECT> can be one of:

ASM

ASM_NASM (Netwide Assembler)

ASM_MASM (Microsoft Assembler)

ASM_MARMASM (Microsoft ARM Assembler)

ASM-ATT (Assembler AT&T)

Will only be used by CMake on the first configuration to determine
ASM<DIALECT> compiler, after which the value for ASM<DIALECT> is stored
in the cache as
CMAKE_ASM<DIALECT>_COMPILER. For subsequent
configuration runs, the environment variable will be ignored in favor of
CMAKE_ASM<DIALECT>_COMPILER.

Note

Options that are required to make the compiler work correctly can be included;
they can not be changed.

$ export ASM="custom-compiler --arg1 --arg2"

Previous topic

VERBOSE

Next topic

ASM<DIALECT>FLAGS

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

ASM<DIALECT>

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>ASM<DIALECT>FLAGS — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CC" href="CC.html" />
    <link rel="prev" title="ASM<DIALECT>" href="ASM_DIALECT.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

ASM<DIALECT>FLAGS

<span id="envvar:ASM<DIALECT>FLAGS">
ASM<DIALECT>FLAGS¶

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

Add default compilation flags to be used when compiling a specific dialect
of an assembly language.  ASM<DIALECT>FLAGS can be one of:

ASMFLAGS

ASM_NASMFLAGS

ASM_MASMFLAGS

ASM_MARMASMFLAGS

ASM-ATTFLAGS

CMake uses this environment variable value, in combination with its own
builtin default flags for the toolchain, to initialize and store the
CMAKE_ASM<DIALECT>_FLAGS cache entry.
This occurs the first time a build tree is configured for language ASM<DIALECT>.
For any configuration run (including the first), the environment variable
will be ignored if the CMAKE_ASM<DIALECT>_FLAGS variable is already defined.

See also CMAKE_ASM<DIALECT>_FLAGS_INIT.

Previous topic

ASM<DIALECT>

Next topic

CC

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

ASM<DIALECT>FLAGS

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CC — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CFLAGS" href="CFLAGS.html" />
    <link rel="prev" title="ASM<DIALECT>FLAGS" href="ASM_DIALECTFLAGS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CC

CC¶

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

Preferred executable for compiling C language files. Will only be used by
CMake on the first configuration to determine C compiler, after which the
value for CC is stored in the cache as
CMAKE_C_COMPILER. For any configuration run
(including the first), the environment variable will be ignored if the
CMAKE_C_COMPILER variable is defined.

Note

Options that are required to make the compiler work correctly can be included;
they can not be changed.

$ export CC="custom-compiler --arg1 --arg2"

Previous topic

ASM<DIALECT>FLAGS

Next topic

CFLAGS

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CC

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CCMAKE_COLORS — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="cmake-file-api(7)" href="../manual/cmake-file-api.7.html" />
    <link rel="prev" title="DASHBOARD_TEST_FROM_CTEST" href="DASHBOARD_TEST_FROM_CTEST.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CCMAKE_COLORS

CCMAKE_COLORS¶

New in version 3.18.

Determines what colors are used by the CMake curses interface,
when run on a terminal that supports colors.
The syntax follows the same conventions as LS_COLORS;
that is, a list of key/value pairs separated by :.

Keys are a single letter corresponding to a CMake cache variable type:

s: A STRING.

p: A FILEPATH.

c: A value which has an associated list of choices.

y: A BOOL which has a true-like value (e.g. ON, YES).

n: A BOOL which has a false-like value (e.g. OFF, NO).

Values are an integer number that specifies what color to use.
0 is black (you probably don't want to use that).
Others are determined by your terminal's color support.
Most (color) terminals will support at least 8 or 16 colors.
Some will support up to 256 colors. The colors will likely match
this chart,
although the first 16 colors may match the original
CGA color palette.
(Many modern terminal emulators also allow their color palette,
at least for the first 16 colors, to be configured by the user.)

Note that fairly minimal checking is done for bad colors
(although a value higher than what curses believes your terminal supports
will be silently ignored) or bad syntax.

For example:

CCMAKE_COLORS='s=39:p=220:c=207:n=196:y=46'

Previous topic

DASHBOARD_TEST_FROM_CTEST

Next topic

cmake-file-api(7)

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CCMAKE_COLORS

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CFLAGS — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CSFLAGS" href="CSFLAGS.html" />
    <link rel="prev" title="CC" href="CC.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CFLAGS

CFLAGS¶

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

Add default compilation flags to be used when compiling C files.

CMake uses this environment variable value, in combination with its own
builtin default flags for the toolchain, to initialize and store the
CMAKE_C_FLAGS cache entry.
This occurs the first time a build tree is configured for language C.
For any configuration run (including the first), the environment variable
will be ignored if the CMAKE_C_FLAGS variable is already defined.

See also CMAKE_C_FLAGS_INIT.

Previous topic

CC

Next topic

CSFLAGS

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CFLAGS

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_APPBUNDLE_PATH — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_FRAMEWORK_PATH" href="CMAKE_FRAMEWORK_PATH.html" />
    <link rel="prev" title="cmake-env-variables(7)" href="../manual/cmake-env-variables.7.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_APPBUNDLE_PATH

CMAKE_APPBUNDLE_PATH¶

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

The CMAKE_APPBUNDLE_PATH environment variable may be set to a list of
directories to be searched for macOS application bundles
by the find_program() and find_package() commands.

This variable may hold a single directory or a list of directories separated
by : on UNIX or ; on Windows (the same as the PATH environment
variable convention on those platforms).

See also the CMAKE_APPBUNDLE_PATH CMake variable.

Previous topic

cmake-env-variables(7)

Next topic

CMAKE_FRAMEWORK_PATH

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_APPBUNDLE_PATH

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_APPLE_SILICON_PROCESSOR — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_BUILD_PARALLEL_LEVEL" href="CMAKE_BUILD_PARALLEL_LEVEL.html" />
    <link rel="prev" title="ADSP_ROOT" href="ADSP_ROOT.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_APPLE_SILICON_PROCESSOR

CMAKE_APPLE_SILICON_PROCESSOR¶

New in version 3.19.2.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

On Apple Silicon hosts running macOS, set this environment variable to tell
CMake what architecture to use for CMAKE_HOST_SYSTEM_PROCESSOR.
The value must be either arm64 or x86_64.

The CMAKE_APPLE_SILICON_PROCESSOR normal variable, if set,
overrides this environment variable.

Previous topic

ADSP_ROOT

Next topic

CMAKE_BUILD_PARALLEL_LEVEL

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_APPLE_SILICON_PROCESSOR

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_BUILD_PARALLEL_LEVEL — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_BUILD_TYPE" href="CMAKE_BUILD_TYPE.html" />
    <link rel="prev" title="CMAKE_APPLE_SILICON_PROCESSOR" href="CMAKE_APPLE_SILICON_PROCESSOR.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_BUILD_PARALLEL_LEVEL

CMAKE_BUILD_PARALLEL_LEVEL¶

New in version 3.12.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

Specifies the maximum number of concurrent processes to use when building
using the cmake --build command line
Build Tool Mode.
For example, if CMAKE_BUILD_PARALLEL_LEVEL is set to 8, the
underlying build tool will execute up to 8 jobs concurrently as if
cmake --build were invoked with the
--parallel 8 option.

If this variable is defined empty the native build tool's default number is
used.

Previous topic

CMAKE_APPLE_SILICON_PROCESSOR

Next topic

CMAKE_BUILD_TYPE

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_BUILD_PARALLEL_LEVEL

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_BUILD_TYPE — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_COLOR_DIAGNOSTICS" href="CMAKE_COLOR_DIAGNOSTICS.html" />
    <link rel="prev" title="CMAKE_BUILD_PARALLEL_LEVEL" href="CMAKE_BUILD_PARALLEL_LEVEL.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_BUILD_TYPE

CMAKE_BUILD_TYPE¶

New in version 3.22.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

The CMAKE_BUILD_TYPE environment variable specifies a default value
for the CMAKE_BUILD_TYPE variable when there is no explicit
configuration given on the first run while creating a new build tree.

Previous topic

CMAKE_BUILD_PARALLEL_LEVEL

Next topic

CMAKE_COLOR_DIAGNOSTICS

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_BUILD_TYPE

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_COLOR_DIAGNOSTICS — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_CONFIGURATION_TYPES" href="CMAKE_CONFIGURATION_TYPES.html" />
    <link rel="prev" title="CMAKE_BUILD_TYPE" href="CMAKE_BUILD_TYPE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_COLOR_DIAGNOSTICS

CMAKE_COLOR_DIAGNOSTICS¶

New in version 3.24.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

Specifies a default value for the CMAKE_COLOR_DIAGNOSTICS variable
when there is no explicit value given on the first run.

Previous topic

CMAKE_BUILD_TYPE

Next topic

CMAKE_CONFIGURATION_TYPES

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_COLOR_DIAGNOSTICS

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_CONFIGURATION_TYPES — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_CONFIG_TYPE" href="CMAKE_CONFIG_TYPE.html" />
    <link rel="prev" title="CMAKE_COLOR_DIAGNOSTICS" href="CMAKE_COLOR_DIAGNOSTICS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_CONFIGURATION_TYPES

CMAKE_CONFIGURATION_TYPES¶

New in version 3.22.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

The CMAKE_CONFIGURATION_TYPES environment variable specifies a
default value for the CMAKE_CONFIGURATION_TYPES variable
when there is no explicit configuration given on the first run while
creating a new build tree.

Previous topic

CMAKE_COLOR_DIAGNOSTICS

Next topic

CMAKE_CONFIG_TYPE

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_CONFIGURATION_TYPES

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_CONFIG_TYPE — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_CROSSCOMPILING_EMULATOR" href="CMAKE_CROSSCOMPILING_EMULATOR.html" />
    <link rel="prev" title="CMAKE_CONFIGURATION_TYPES" href="CMAKE_CONFIGURATION_TYPES.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_CONFIG_TYPE

CMAKE_CONFIG_TYPE¶

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

The default build configuration for Build a Project and
ctest build handler when there is no explicit configuration given.

Previous topic

CMAKE_CONFIGURATION_TYPES

Next topic

CMAKE_CROSSCOMPILING_EMULATOR

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_CONFIG_TYPE

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_CROSSCOMPILING_EMULATOR — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_EXPORT_COMPILE_COMMANDS" href="CMAKE_EXPORT_COMPILE_COMMANDS.html" />
    <link rel="prev" title="CMAKE_CONFIG_TYPE" href="CMAKE_CONFIG_TYPE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_CROSSCOMPILING_EMULATOR

CMAKE_CROSSCOMPILING_EMULATOR¶

New in version 3.28.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

The default value for CMAKE_CROSSCOMPILING_EMULATOR when there
is no explicit configuration given on the first run while creating a new
build tree.  On later runs in an existing build tree the value persists in
the cache as CMAKE_CROSSCOMPILING_EMULATOR.

Previous topic

CMAKE_CONFIG_TYPE

Next topic

CMAKE_EXPORT_COMPILE_COMMANDS

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_CROSSCOMPILING_EMULATOR

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_EXPORT_COMPILE_COMMANDS — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_GENERATOR" href="CMAKE_GENERATOR.html" />
    <link rel="prev" title="CMAKE_CROSSCOMPILING_EMULATOR" href="CMAKE_CROSSCOMPILING_EMULATOR.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_EXPORT_COMPILE_COMMANDS

CMAKE_EXPORT_COMPILE_COMMANDS¶

New in version 3.17.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

The default value for CMAKE_EXPORT_COMPILE_COMMANDS when there
is no explicit configuration given on the first run while creating a new
build tree.  On later runs in an existing build tree the value persists in
the cache as CMAKE_EXPORT_COMPILE_COMMANDS.

Previous topic

CMAKE_CROSSCOMPILING_EMULATOR

Next topic

CMAKE_GENERATOR

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_EXPORT_COMPILE_COMMANDS

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_FRAMEWORK_PATH — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_INCLUDE_PATH" href="CMAKE_INCLUDE_PATH.html" />
    <link rel="prev" title="CMAKE_APPBUNDLE_PATH" href="CMAKE_APPBUNDLE_PATH.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_FRAMEWORK_PATH

CMAKE_FRAMEWORK_PATH¶

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

The CMAKE_FRAMEWORK_PATH environment variable may be set to a list of
directories to be searched for macOS frameworks by the find_library(),
find_package(), find_path() and find_file() commands.

This variable may hold a single directory or a list of directories separated
by : on UNIX or ; on Windows (the same as the PATH environment
variable convention on those platforms).

See also the CMAKE_FRAMEWORK_PATH CMake variable.

Previous topic

CMAKE_APPBUNDLE_PATH

Next topic

CMAKE_INCLUDE_PATH

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_FRAMEWORK_PATH

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_GENERATOR — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_GENERATOR_INSTANCE" href="CMAKE_GENERATOR_INSTANCE.html" />
    <link rel="prev" title="CMAKE_EXPORT_COMPILE_COMMANDS" href="CMAKE_EXPORT_COMPILE_COMMANDS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_GENERATOR

CMAKE_GENERATOR¶

New in version 3.15.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

Specifies the CMake default generator to use when no generator is supplied
with -G. If the provided value doesn't name a generator
known by CMake, the internal default is used.  Either way the resulting
generator selection is stored in the CMAKE_GENERATOR variable.

Some generators may be additionally configured using the environment
variables:

CMAKE_GENERATOR_PLATFORM

CMAKE_GENERATOR_TOOLSET

CMAKE_GENERATOR_INSTANCE

Previous topic

CMAKE_EXPORT_COMPILE_COMMANDS

Next topic

CMAKE_GENERATOR_INSTANCE

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_GENERATOR

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_GENERATOR_INSTANCE — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_GENERATOR_PLATFORM" href="CMAKE_GENERATOR_PLATFORM.html" />
    <link rel="prev" title="CMAKE_GENERATOR" href="CMAKE_GENERATOR.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_GENERATOR_INSTANCE

CMAKE_GENERATOR_INSTANCE¶

New in version 3.15.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

Default value for CMAKE_GENERATOR_INSTANCE if no Cache entry is
present. This value is only applied if CMAKE_GENERATOR is set.

Previous topic

CMAKE_GENERATOR

Next topic

CMAKE_GENERATOR_PLATFORM

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_GENERATOR_INSTANCE

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_GENERATOR_PLATFORM — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_GENERATOR_TOOLSET" href="CMAKE_GENERATOR_TOOLSET.html" />
    <link rel="prev" title="CMAKE_GENERATOR_INSTANCE" href="CMAKE_GENERATOR_INSTANCE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_GENERATOR_PLATFORM

CMAKE_GENERATOR_PLATFORM¶

New in version 3.15.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

Default value for CMAKE_GENERATOR_PLATFORM if no Cache entry
is present and no value is specified by cmake -A option.
This value is only applied if CMAKE_GENERATOR is set.

Previous topic

CMAKE_GENERATOR_INSTANCE

Next topic

CMAKE_GENERATOR_TOOLSET

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_GENERATOR_PLATFORM

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_GENERATOR_TOOLSET — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_INSTALL_MODE" href="CMAKE_INSTALL_MODE.html" />
    <link rel="prev" title="CMAKE_GENERATOR_PLATFORM" href="CMAKE_GENERATOR_PLATFORM.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_GENERATOR_TOOLSET

CMAKE_GENERATOR_TOOLSET¶

New in version 3.15.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

Default value for CMAKE_GENERATOR_TOOLSET if no Cache entry
is present and no value is specified by cmake -T option.
This value is only applied if CMAKE_GENERATOR is set.

Previous topic

CMAKE_GENERATOR_PLATFORM

Next topic

CMAKE_INSTALL_MODE

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_GENERATOR_TOOLSET

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_INCLUDE_PATH — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_LIBRARY_PATH" href="CMAKE_LIBRARY_PATH.html" />
    <link rel="prev" title="CMAKE_FRAMEWORK_PATH" href="CMAKE_FRAMEWORK_PATH.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_INCLUDE_PATH

CMAKE_INCLUDE_PATH¶

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

The CMAKE_INCLUDE_PATH environment variable may be set to a list of
directories to be searched by the find_file() and find_path() commands.

This variable may hold a single directory or a list of directories separated
by : on UNIX or ; on Windows (the same as the PATH environment
variable convention on those platforms).

See also the CMAKE_INCLUDE_PATH CMake variable.

Previous topic

CMAKE_FRAMEWORK_PATH

Next topic

CMAKE_LIBRARY_PATH

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_INCLUDE_PATH

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_INSTALL_MODE — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_INSTALL_PREFIX" href="CMAKE_INSTALL_PREFIX.html" />
    <link rel="prev" title="CMAKE_GENERATOR_TOOLSET" href="CMAKE_GENERATOR_TOOLSET.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_INSTALL_MODE

CMAKE_INSTALL_MODE¶

New in version 3.22.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

The CMAKE_INSTALL_MODE environment variable allows users to operate
CMake in an alternate mode of file(INSTALL) and install().

The default behavior for an installation is to copy a source file from a
source directory into a destination directory. This environment variable
however allows the user to override this behavior, causing CMake to create
symbolic links instead.

Usage Scenarios¶

Installing symbolic links rather than copying files can help in the following
ways:

Conserving storage space because files do not have to be duplicated on disk.

Changes to the source of the symbolic link are seen at the install
destination without having to re-run the install step.

Editing through the link at the install destination will modify the source
of the link. This may be useful when dealing with CMake project hierarchies,
i.e. using ExternalProject and consistent source navigation and
refactoring is desired across projects.

Allowed Values¶

The following values are allowed for CMAKE_INSTALL_MODE:

COPY, empty or unset

Duplicate the file at its destination.  This is the default behavior.

ABS_SYMLINK

Create an absolute symbolic link to the source file at the destination.
Halt with an error if the link cannot be created.

ABS_SYMLINK_OR_COPY

Like ABS_SYMLINK but fall back to silently copying if the symlink
couldn't be created.

REL_SYMLINK

Create a relative symbolic link to the source file at the destination.
Halt with an error if the link cannot be created.

REL_SYMLINK_OR_COPY

Like REL_SYMLINK but fall back to silently copying if the symlink
couldn't be created.

SYMLINK

Try as if through REL_SYMLINK and fall back to ABS_SYMLINK if the
referenced file cannot be expressed using a relative path.
Halt with an error if the link cannot be created.

SYMLINK_OR_COPY

Like SYMLINK but fall back to silently copying if the symlink couldn't
be created.

Note

A symbolic link consists of a reference file path rather than contents of its
own, hence there are two ways to express the relation, either by a relative
or an absolute path.

When To Set The Environment Variable¶

For the environment variable to take effect, it must be set during the correct
build phase(s).

If the project calls file(INSTALL) directly, the environment
variable must be set during the configuration phase.

In order to apply to install(), the environment variable must be
set during installation.  This could be during a build if using the
install or package build targets, or separate from the build when
invoking an install or running cpack from the command
line.

When using ExternalProject, it might be required during the build
phase, since the external project's own configure, build and install steps
will execute during the main project's build phase.

Given the above, it is recommended to set the environment variable consistently
across all phases (configure, build and install).

Caveats¶

Use this environment variable with caution. The following highlights some
points to be considered:

CMAKE_INSTALL_MODE only affects files, not directories.

Symbolic links are not available on all platforms.

The way this environment variable interacts with the install step of
ExternalProject is more complex. For further details, see that
module's documentation.

A symbolic link ties the destination to the source in a persistent way.
Writing to either of the two affects both file system objects.
This is in contrast to normal install behavior which only copies files as
they were at the time the install was performed, with no enduring
relationship between the source and destination of the install.

Combining CMAKE_INSTALL_MODE with IOS_INSTALL_COMBINED is
not supported.

Changing CMAKE_INSTALL_MODE from what it was on a previous run can lead
to unexpected results.  Moving from a non-symlinking mode to a symlinking
mode will discard any previous file at the destination, but the reverse is
not true.  Once a symlink exists at the destination, even if you switch to a
non-symlink mode, the symlink will continue to exist at the destination and
will not be replaced by an actual file.

Table of Contents

CMAKE_INSTALL_MODE

Usage Scenarios

Allowed Values

When To Set The Environment Variable

Caveats

Previous topic

CMAKE_GENERATOR_TOOLSET

Next topic

CMAKE_INSTALL_PREFIX

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_INSTALL_MODE

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>CMAKE_INSTALL_PREFIX — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_<LANG>_COMPILER_LAUNCHER" href="CMAKE_LANG_COMPILER_LAUNCHER.html" />
    <link rel="prev" title="CMAKE_INSTALL_MODE" href="CMAKE_INSTALL_MODE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_INSTALL_PREFIX

CMAKE_INSTALL_PREFIX¶

New in version 3.29.

This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.

The CMAKE_INSTALL_PREFIX environment variable specifies a custom default
value for the CMAKE_INSTALL_PREFIX variable in place of the
default values specified by CMake itself. The value specified must be an
absolute path to a directory.

Previous topic

CMAKE_INSTALL_MODE

Next topic

CMAKE_<LANG>_COMPILER_LAUNCHER

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-env-variables(7) »

CMAKE_INSTALL_PREFIX

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.