Help: Note that some packaging preset keywords don't work as expected

Due to how the default value of the CPACK_PACKAGE_FILE_NAME variable
is implemented, the packageName and packageVersion fields of packaging
presets don't affect the final package file name. They can still affect other
aspects of the package produced, depending on the package generator
used, leading to inconsistencies in the generated package. There is no
warning or error about this when producing the packages, and fixing the
implementation is non-trivial. Until such a fix can be made, add a note to
the docs to make users aware of this unexpected behavior.

Issue: #25248
This commit is contained in:
Craig Scott
2025-08-01 16:45:15 +10:00
parent 025794aab1
commit 60a921dce4

View File

@@ -1083,9 +1083,25 @@ fields:
``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. Other aspects of the package
may use the value though, leading to inconsistencies.
A future CMake release may address this problem, but until then, it is
recommended that this field not be used.
``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. Other aspects of the package
may use the value though, leading to inconsistencies.
A future CMake release may address this problem, but until then, it is
recommended that this field not be used.
``packageDirectory``
An optional string representing the directory in which to place the package.