nuget.rst 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. CPack NuGet Generator
  2. ---------------------
  3. When build a NuGet package there is no direct way to control an output
  4. filename due a lack of the corresponding CLI option of NuGet, so there
  5. is no ``CPACK_NUGET_PACKAGE_FILE_NAME`` variable. To form the output filename
  6. NuGet uses the package name and the version according to its built-in rules.
  7. Also, be aware that including a top level directory
  8. (``CPACK_INCLUDE_TOPLEVEL_DIRECTORY``) is ignored by this generator.
  9. Variables specific to CPack NuGet generator
  10. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  11. The CPack NuGet generator may be used to create NuGet packages using
  12. :module:`CPack`. The CPack NuGet generator is a :module:`CPack` generator thus
  13. it uses the ``CPACK_XXX`` variables used by :module:`CPack`.
  14. The CPack NuGet generator has specific features which are controlled by the
  15. specifics ``CPACK_NUGET_XXX`` variables. In the "one per group" mode
  16. (see :variable:`CPACK_COMPONENTS_GROUPING`), ``<compName>`` placeholder
  17. in the variables below would contain a group name (uppercased and turned into
  18. a "C" identifier).
  19. List of CPack NuGet generator specific variables:
  20. .. variable:: CPACK_NUGET_COMPONENT_INSTALL
  21. Enable component packaging for CPack NuGet generator
  22. * Mandatory : NO
  23. * Default : OFF
  24. .. variable:: CPACK_NUGET_PACKAGE_NAME
  25. CPACK_NUGET_<compName>_PACKAGE_NAME
  26. The NUGET package name. ``CPACK_NUGET_PACKAGE_NAME`` is used as the
  27. package ``id`` on nuget.org_
  28. * Mandatory : YES
  29. * Default : :variable:`CPACK_PACKAGE_NAME`
  30. .. variable:: CPACK_NUGET_PACKAGE_VERSION
  31. CPACK_NUGET_<compName>_PACKAGE_VERSION
  32. The NuGet package version.
  33. * Mandatory : YES
  34. * Default : :variable:`CPACK_PACKAGE_VERSION`
  35. .. variable:: CPACK_NUGET_PACKAGE_DESCRIPTION
  36. CPACK_NUGET_<compName>_PACKAGE_DESCRIPTION
  37. A long description of the package for UI display.
  38. * Mandatory : YES
  39. * Default :
  40. - :variable:`CPACK_COMPONENT_<compName>_DESCRIPTION`,
  41. - ``CPACK_COMPONENT_GROUP_<groupName>_DESCRIPTION``,
  42. - :variable:`CPACK_PACKAGE_DESCRIPTION`
  43. .. variable:: CPACK_NUGET_PACKAGE_AUTHORS
  44. CPACK_NUGET_<compName>_PACKAGE_AUTHORS
  45. A comma-separated list of packages authors, matching the profile names
  46. on nuget.org_. These are displayed in the NuGet Gallery on
  47. nuget.org_ and are used to cross-reference packages by the same
  48. authors.
  49. * Mandatory : YES
  50. * Default : :variable:`CPACK_PACKAGE_VENDOR`
  51. .. variable:: CPACK_NUGET_PACKAGE_TITLE
  52. CPACK_NUGET_<compName>_PACKAGE_TITLE
  53. A human-friendly title of the package, typically used in UI displays
  54. as on nuget.org_ and the Package Manager in Visual Studio. If not
  55. specified, the package ID is used.
  56. * Mandatory : NO
  57. * Default :
  58. - :variable:`CPACK_COMPONENT_<compName>_DISPLAY_NAME`,
  59. - ``CPACK_COMPONENT_GROUP_<groupName>_DISPLAY_NAME``
  60. .. variable:: CPACK_NUGET_PACKAGE_OWNERS
  61. CPACK_NUGET_<compName>_PACKAGE_OWNERS
  62. A comma-separated list of the package creators using profile names
  63. on nuget.org_. This is often the same list as in authors,
  64. and is ignored when uploading the package to nuget.org_.
  65. * Mandatory : NO
  66. * Default : -
  67. .. variable:: CPACK_NUGET_PACKAGE_HOMEPAGE_URL
  68. CPACK_NUGET_<compName>_PACKAGE_HOMEPAGE_URL
  69. An URL for the package's home page, often shown in UI displays as well
  70. as nuget.org_.
  71. * Mandatory : NO
  72. * Default : :variable:`CPACK_PACKAGE_HOMEPAGE_URL`
  73. .. variable:: CPACK_NUGET_PACKAGE_LICENSEURL
  74. CPACK_NUGET_<compName>_PACKAGE_LICENSEURL
  75. An URL for the package's license, often shown in UI displays as well
  76. as on nuget.org_. To be deprecated in favor of a reference to a local
  77. license file (``CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME`` or
  78. ``CPACK_NUGET_<compName>_PACKAGE_LICENSE_FILE_NAME``) or a Software
  79. Package Data Exchange `(SPDX) license identifier`_ or expression
  80. (``CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION`` or
  81. ``CPACK_NUGET_<compName>_PACKAGE_LICENSE_EXPRESSION``)
  82. * Mandatory : NO
  83. * Default : -
  84. .. variable:: CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION
  85. CPACK_NUGET_<compName>_PACKAGE_LICENSE_EXPRESSION
  86. A Software Package Data Exchange `(SPDX) license identifier`_ such as
  87. ``MIT``, ``BSD-3-Clause``, or ``LGPL-3.0-or-later``. In the case of a
  88. choice of licenses or more complex restrictions, compound license
  89. expressions may be formed using boolean operators, for example
  90. ``MIT OR BSD-3-Clause``. See the `SPDX specification`_ for guidance
  91. on forming complex license expressions.
  92. If ``CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME`` is specified,
  93. ``CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION`` is ignored.
  94. * Mandatory : NO
  95. * Default : -
  96. .. variable:: CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME
  97. CPACK_NUGET_<compName>_PACKAGE_LICENSE_FILE_NAME
  98. The package's license file in :file:`.txt` or :file:`.md` format.
  99. If ``CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME`` is specified,
  100. ``CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION`` is ignored.
  101. * Mandatory : NO
  102. * Default : -
  103. .. variable:: CPACK_NUGET_PACKAGE_ICONURL
  104. CPACK_NUGET_<compName>_PACKAGE_ICONURL
  105. An URL for a 64x64 image with transparency background to use as the
  106. icon for the package in UI display. To be deprecated in favor of
  107. ``CPACK_NUGET_PACKAGE_ICON``.
  108. * Mandatory : NO
  109. * Default : -
  110. .. variable:: CPACK_NUGET_PACKAGE_ICON
  111. CPACK_NUGET_<compName>_PACKAGE_ICON
  112. The filename of a 64x64 image with transparency background to use as the
  113. icon for the package in UI display.
  114. * Mandatory : NO
  115. * Default : -
  116. .. variable:: CPACK_NUGET_PACKAGE_DESCRIPTION_SUMMARY
  117. CPACK_NUGET_<compName>_PACKAGE_DESCRIPTION_SUMMARY
  118. A short description of the package for UI display. If omitted, a
  119. truncated version of description is used.
  120. * Mandatory : NO
  121. * Default : :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
  122. .. variable:: CPACK_NUGET_PACKAGE_RELEASE_NOTES
  123. CPACK_NUGET_<compName>_PACKAGE_RELEASE_NOTES
  124. A description of the changes made in this release of the package,
  125. often used in UI like the Updates tab of the Visual Studio Package
  126. Manager in place of the package description.
  127. * Mandatory : NO
  128. * Default : -
  129. .. variable:: CPACK_NUGET_PACKAGE_COPYRIGHT
  130. CPACK_NUGET_<compName>_PACKAGE_COPYRIGHT
  131. Copyright details for the package.
  132. * Mandatory : NO
  133. * Default : -
  134. .. variable:: CPACK_NUGET_PACKAGE_LANGUAGE
  135. CPACK_NUGET_<compName>_PACKAGE_LANGUAGE
  136. Locale specifier for the package, for example ``en_CA``.
  137. * Mandatory : NO
  138. * Default : -
  139. .. variable:: CPACK_NUGET_PACKAGE_TAGS
  140. CPACK_NUGET_<compName>_PACKAGE_TAGS
  141. A space-delimited list of tags and keywords that describe the
  142. package and aid discoverability of packages through search and
  143. filtering.
  144. * Mandatory : NO
  145. * Default : -
  146. .. variable:: CPACK_NUGET_PACKAGE_DEPENDENCIES
  147. CPACK_NUGET_<compName>_PACKAGE_DEPENDENCIES
  148. A list of package dependencies.
  149. * Mandatory : NO
  150. * Default : -
  151. .. variable:: CPACK_NUGET_PACKAGE_DEPENDENCIES_<dependency>_VERSION
  152. CPACK_NUGET_<compName>_PACKAGE_DEPENDENCIES_<dependency>_VERSION
  153. A `version specification`_ for the particular dependency, where
  154. ``<dependency>`` is an item of the dependency list (see above)
  155. transformed with ``MAKE_C_IDENTIFIER`` function of :command:`string`
  156. command.
  157. * Mandatory : NO
  158. * Default : -
  159. .. variable:: CPACK_NUGET_PACKAGE_DEBUG
  160. Enable debug messages while executing CPack NuGet generator.
  161. * Mandatory : NO
  162. * Default : OFF
  163. .. _nuget.org: http://nuget.org
  164. .. _version specification: https://docs.microsoft.com/en-us/nuget/reference/package-versioning#version-ranges-and-wildcards
  165. .. _(SPDX) license identifier: https://spdx.org/licenses/
  166. .. _SPDX specification: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/
  167. .. NuGet spec docs https://docs.microsoft.com/en-us/nuget/reference/nuspec