6 When build a NuGet package there is no direct way to control an output
7 filename due a lack of the corresponding CLI option of NuGet, so there
8 is no ``CPACK_NUGET_PACKAGE_FILE_NAME`` variable. To form the output filename
9 NuGet uses the package name and the version according to its built-in rules.
11 Also, be aware that including a top level directory
12 (``CPACK_INCLUDE_TOPLEVEL_DIRECTORY``) is ignored by this generator.
15 Variables specific to CPack NuGet generator
16 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 The CPack NuGet generator may be used to create NuGet packages using
19 :module:`CPack`. The CPack NuGet generator is a :module:`CPack` generator thus
20 it uses the ``CPACK_XXX`` variables used by :module:`CPack`.
22 The CPack NuGet generator has specific features which are controlled by the
23 specifics ``CPACK_NUGET_XXX`` variables. In the "one per group" mode
24 (see :variable:`CPACK_COMPONENTS_GROUPING`), ``<compName>`` placeholder
25 in the variables below would contain a group name (uppercased and turned into
28 List of CPack NuGet generator specific variables:
30 .. variable:: CPACK_NUGET_COMPONENT_INSTALL
32 Enable component packaging for CPack NuGet generator
37 .. variable:: CPACK_NUGET_PACKAGE_NAME
38 CPACK_NUGET_<compName>_PACKAGE_NAME
40 The NUGET package name. ``CPACK_NUGET_PACKAGE_NAME`` is used as the
41 package ``id`` on nuget.org_
44 * Default : :variable:`CPACK_PACKAGE_NAME`
46 .. variable:: CPACK_NUGET_PACKAGE_VERSION
47 CPACK_NUGET_<compName>_PACKAGE_VERSION
49 The NuGet package version.
52 * Default : :variable:`CPACK_PACKAGE_VERSION`
54 .. variable:: CPACK_NUGET_PACKAGE_DESCRIPTION
55 CPACK_NUGET_<compName>_PACKAGE_DESCRIPTION
57 A long description of the package for UI display.
61 - :variable:`CPACK_COMPONENT_<compName>_DESCRIPTION`,
62 - ``CPACK_COMPONENT_GROUP_<groupName>_DESCRIPTION``,
63 - :variable:`CPACK_PACKAGE_DESCRIPTION`
65 .. variable:: CPACK_NUGET_PACKAGE_AUTHORS
66 CPACK_NUGET_<compName>_PACKAGE_AUTHORS
68 A comma-separated list of packages authors, matching the profile names
69 on nuget.org_. These are displayed in the NuGet Gallery on
70 nuget.org_ and are used to cross-reference packages by the same
74 * Default : :variable:`CPACK_PACKAGE_VENDOR`
76 .. variable:: CPACK_NUGET_PACKAGE_TITLE
77 CPACK_NUGET_<compName>_PACKAGE_TITLE
79 A human-friendly title of the package, typically used in UI displays
80 as on nuget.org_ and the Package Manager in Visual Studio. If not
81 specified, the package ID is used.
85 - :variable:`CPACK_COMPONENT_<compName>_DISPLAY_NAME`,
86 - ``CPACK_COMPONENT_GROUP_<groupName>_DISPLAY_NAME``
88 .. variable:: CPACK_NUGET_PACKAGE_OWNERS
89 CPACK_NUGET_<compName>_PACKAGE_OWNERS
91 A comma-separated list of the package creators using profile names
92 on nuget.org_. This is often the same list as in authors,
93 and is ignored when uploading the package to nuget.org_.
98 .. variable:: CPACK_NUGET_PACKAGE_HOMEPAGE_URL
99 CPACK_NUGET_<compName>_PACKAGE_HOMEPAGE_URL
101 An URL for the package's home page, often shown in UI displays as well
105 * Default : :variable:`CPACK_PACKAGE_HOMEPAGE_URL`
107 .. variable:: CPACK_NUGET_PACKAGE_LICENSEURL
108 CPACK_NUGET_<compName>_PACKAGE_LICENSEURL
111 Use a local license file
112 (:variable:`CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME`)
113 or a `(SPDX) license identifier`_
114 (:variable:`CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION`) instead.
116 An URL for the package's license, often shown in UI displays as well
122 .. variable:: CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION
123 CPACK_NUGET_<compName>_PACKAGE_LICENSE_EXPRESSION
125 .. versionadded:: 3.20
127 A Software Package Data Exchange `(SPDX) license identifier`_ such as
128 ``MIT``, ``BSD-3-Clause``, or ``LGPL-3.0-or-later``. In the case of a
129 choice of licenses or more complex restrictions, compound license
130 expressions may be formed using boolean operators, for example
131 ``MIT OR BSD-3-Clause``. See the `SPDX specification`_ for guidance
132 on forming complex license expressions.
134 If ``CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME`` is specified,
135 ``CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION`` is ignored.
140 .. variable:: CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME
141 CPACK_NUGET_<compName>_PACKAGE_LICENSE_FILE_NAME
143 The package's license file in :file:`.txt` or :file:`.md` format.
145 If ``CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME`` is specified,
146 ``CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION`` is ignored.
148 .. versionadded:: 3.20
153 .. variable:: CPACK_NUGET_PACKAGE_ICONURL
154 CPACK_NUGET_<compName>_PACKAGE_ICONURL
157 Use a local icon file (:variable:`CPACK_NUGET_PACKAGE_ICON`) instead.
159 An URL for a 64x64 image with transparency background to use as the
160 icon for the package in UI display.
165 .. variable:: CPACK_NUGET_PACKAGE_ICON
166 CPACK_NUGET_<compName>_PACKAGE_ICON
168 .. versionadded:: 3.20
170 The filename of a 64x64 image with transparency background to use as the
171 icon for the package in UI display.
176 .. variable:: CPACK_NUGET_PACKAGE_DESCRIPTION_SUMMARY
177 CPACK_NUGET_<compName>_PACKAGE_DESCRIPTION_SUMMARY
179 A short description of the package for UI display. If omitted, a
180 truncated version of description is used.
183 * Default : :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
185 .. variable:: CPACK_NUGET_PACKAGE_RELEASE_NOTES
186 CPACK_NUGET_<compName>_PACKAGE_RELEASE_NOTES
188 A description of the changes made in this release of the package,
189 often used in UI like the Updates tab of the Visual Studio Package
190 Manager in place of the package description.
195 .. variable:: CPACK_NUGET_PACKAGE_COPYRIGHT
196 CPACK_NUGET_<compName>_PACKAGE_COPYRIGHT
198 Copyright details for the package.
203 .. variable:: CPACK_NUGET_PACKAGE_LANGUAGE
204 CPACK_NUGET_<compName>_PACKAGE_LANGUAGE
206 .. versionadded:: 3.20
208 Locale specifier for the package, for example ``en_CA``.
213 .. variable:: CPACK_NUGET_PACKAGE_TAGS
214 CPACK_NUGET_<compName>_PACKAGE_TAGS
216 A space-delimited list of tags and keywords that describe the
217 package and aid discoverability of packages through search and
223 .. variable:: CPACK_NUGET_PACKAGE_DEPENDENCIES
224 CPACK_NUGET_<compName>_PACKAGE_DEPENDENCIES
226 A list of package dependencies.
231 .. variable:: CPACK_NUGET_PACKAGE_DEPENDENCIES_<dependency>_VERSION
232 CPACK_NUGET_<compName>_PACKAGE_DEPENDENCIES_<dependency>_VERSION
234 A `version specification`_ for the particular dependency, where
235 ``<dependency>`` is an item of the dependency list (see above)
236 transformed with ``MAKE_C_IDENTIFIER`` function of :command:`string`
242 .. variable:: CPACK_NUGET_PACKAGE_DEBUG
244 Enable debug messages while executing CPack NuGet generator.
250 .. _nuget.org: http://nuget.org
251 .. _version specification: https://docs.microsoft.com/en-us/nuget/reference/package-versioning#version-ranges-and-wildcards
252 .. _(SPDX) license identifier: https://spdx.org/licenses/
253 .. _SPDX specification: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/
255 .. NuGet spec docs https://docs.microsoft.com/en-us/nuget/reference/nuspec