.. This file was generated by Utilities/Scripts/regenerate-presets.py
   from Help/manual/presets/schema.yaml. Do not edit.

.. _`CMakePresets.packagePresets.name`:

``name``
  A required string representing the machine-friendly name of the
  preset. This identifier is used in the :option:`cpack --preset`
  option. There must not be two package presets in the union of
  ``CMakePresets.json`` and ``CMakeUserPresets.json`` in the same
  directory with the same name. However, a package preset may have
  the same name as a configure, build, test, or workflow preset.

.. _`CMakePresets.packagePresets.hidden`:

``hidden``
  An optional boolean specifying whether or not a preset should be
  hidden. If a preset is hidden, it cannot be used in the
  :cpack-option:`--preset` argument and does not have to have a valid
  :preset:`packagePresets.configurePreset`, even from
  inheritance. ``hidden`` presets are intended to be used as a base
  for other presets to inherit via the
  :preset:`packagePresets.inherits` field.

.. _`CMakePresets.packagePresets.inherits`:

``inherits``
  An optional array of strings representing the names of presets from which
  to inherit. This field can also be a string, which is equivalent to an
  array containing one string.

  The preset will inherit all of the fields from the ``inherits`` presets
  by default (except ``name``, ``hidden``, ``inherits``, ``description``,
  and ``displayName``), but can override them as desired. If multiple
  ``inherits`` presets provide conflicting values for the same field, the
  earlier preset in the ``inherits`` array will be preferred.

  A preset can only inherit from another preset that is defined in the same
  file or in one of the files it includes (directly or indirectly). Presets
  in ``CMakePresets.json`` may not inherit from presets in
  ``CMakeUserPresets.json``.

.. _`CMakePresets.packagePresets.condition`:

``condition``
  An optional `Condition`_ object.

.. _`CMakePresets.packagePresets.vendor`:

``vendor``
  An optional map containing vendor-specific information. CMake does not
  interpret the contents of this field except to verify that it is a map if
  it does exist. However, it should follow the same conventions as the
  root-level ``vendor`` field. If vendors use their own per-preset
  ``vendor`` field, they should implement inheritance in a sensible manner
  when appropriate.

.. _`CMakePresets.packagePresets.displayName`:

``displayName``
  An optional string with a human-friendly name of the preset.

.. _`CMakePresets.packagePresets.description`:

``description``
  An optional string with a human-friendly description of the preset.

.. _`CMakePresets.packagePresets.environment`:

``environment``
  An optional map of environment variables. The key is the variable name
  (which may not be an empty string), and the value is either ``null`` or a
  string representing the value of the variable. Each variable is set
  regardless of whether or not a value was given to it by the process's
  environment.

  This field supports `macro expansion`_, and environment variables in this
  map may reference each other, and may be listed in any order, as long as
  such references do not cause a cycle (for example, if ``ENV_1`` is
  ``$env{ENV_2}``, ``ENV_2`` may not be ``$env{ENV_1}``). ``$penv{NAME}``
  allows one to prepend or append values to existing environment variables
  by accessing only values from the parent environment.

  Environment variables are inherited through the ``inherits`` field, and
  the preset's environment will be the union of its own ``environment`` and
  the ``environment`` from all its parents. If multiple presets in this
  union define the same variable, the standard rules of ``inherits`` are
  applied. Setting a variable to ``null`` causes it to not be set, even if
  a value was inherited from another preset.

.. _`CMakePresets.packagePresets.configurePreset`:

``configurePreset``
  An optional string specifying the name of a configure preset to
  associate with this package preset. If ``configurePreset`` is not
  specified, it must be inherited from the inherits preset (unless
  this preset is hidden). The build directory is inferred from the
  configure preset, so packaging will run in the same ``binaryDir``
  that the configuration did and build did.

.. _`CMakePresets.packagePresets.inheritConfigureEnvironment`:

``inheritConfigureEnvironment``
  An optional boolean that defaults to ``true``. If ``true``, the
  environment variables from the associated configure preset are
  inherited after all inherited package preset environments, but
  before environment variables explicitly specified in this package
  preset.

.. _`CMakePresets.packagePresets.generators`:

``generators``
  An optional array of strings representing generators for CPack to use.

.. _`CMakePresets.packagePresets.configurations`:

``configurations``
  An optional array of strings representing build configurations for CPack to package.

.. _`CMakePresets.packagePresets.variables`:

``variables``
  An optional map of variables to pass to CPack, equivalent to
  :cpack-option:`-D` arguments. Each key is the name of a variable,
  and the value is the string to assign to that variable.

.. _`CMakePresets.packagePresets.configFile`:

``configFile``
  An optional string representing the config file for CPack to use.

.. _`CMakePresets.packagePresets.output`:

``output``
  An optional object specifying output options. Valid keys are:

  .. include:: presets/packageOutput-properties.rst

.. _`CMakePresets.packagePresets.packageName`:

``packageName``
  An optional string representing the package name.

  .. note::

    Due to problems with the implementation, this field does not affect
    the name of the final package file produced. However, other aspects
    of the package may use the value, leading to inconsistencies. A
    future CMake release may address this problem, but until then, it
    is recommended that this field not be used.


.. _`CMakePresets.packagePresets.packageVersion`:

``packageVersion``
  An optional string representing the package version.

  .. note::

    Due to problems with the implementation, this field does not affect
    the name of the final package file produced. However, other aspects
    of the package may use the value, leading to inconsistencies. A
    future CMake release may address this problem, but until then, it
    is recommended that this field not be used.


.. _`CMakePresets.packagePresets.packageDirectory`:

``packageDirectory``
  An optional string representing the directory in which to place the package.

.. _`CMakePresets.packagePresets.vendorName`:

``vendorName``
  An optional string representing the vendor name.
