nuget.rst 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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_FILENAME`` 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.
  27. * Mandatory : YES
  28. * Default : :variable:`CPACK_PACKAGE_NAME`
  29. .. variable:: CPACK_NUGET_PACKAGE_VERSION
  30. CPACK_NUGET_<compName>_PACKAGE_VERSION
  31. The NuGet package version.
  32. * Mandatory : YES
  33. * Default : :variable:`CPACK_PACKAGE_VERSION`
  34. .. variable:: CPACK_NUGET_PACKAGE_DESCRIPTION
  35. CPACK_NUGET_<compName>_PACKAGE_DESCRIPTION
  36. A long description of the package for UI display.
  37. * Mandatory : YES
  38. * Default :
  39. - :variable:`CPACK_COMPONENT_<compName>_DESCRIPTION`,
  40. - ``CPACK_COMPONENT_GROUP_<groupName>_DESCRIPTION``,
  41. - :variable:`CPACK_PACKAGE_DESCRIPTION`
  42. .. variable:: CPACK_NUGET_PACKAGE_AUTHORS
  43. CPACK_NUGET_<compName>_PACKAGE_AUTHORS
  44. A comma-separated list of packages authors, matching the profile names
  45. on nuget.org_. These are displayed in the NuGet Gallery on
  46. nuget.org_ and are used to cross-reference packages by the same
  47. authors.
  48. * Mandatory : YES
  49. * Default : :variable:`CPACK_PACKAGE_VENDOR`
  50. .. variable:: CPACK_NUGET_PACKAGE_TITLE
  51. CPACK_NUGET_<compName>_PACKAGE_TITLE
  52. A human-friendly title of the package, typically used in UI displays
  53. as on nuget.org_ and the Package Manager in Visual Studio. If not
  54. specified, the package ID is used.
  55. * Mandatory : NO
  56. * Default :
  57. - :variable:`CPACK_COMPONENT_<compName>_DISPLAY_NAME`,
  58. - ``CPACK_COMPONENT_GROUP_<groupName>_DISPLAY_NAME``
  59. .. variable:: CPACK_NUGET_PACKAGE_OWNERS
  60. CPACK_NUGET_<compName>_PACKAGE_OWNERS
  61. A comma-separated list of the package creators using profile names
  62. on nuget.org_. This is often the same list as in authors,
  63. and is ignored when uploading the package to nuget.org_.
  64. * Mandatory : NO
  65. * Default : -
  66. .. variable:: CPACK_NUGET_PACKAGE_HOMEPAGE_URL
  67. CPACK_NUGET_<compName>_PACKAGE_HOMEPAGE_URL
  68. A URL for the package's home page, often shown in UI displays as well
  69. as nuget.org_.
  70. * Mandatory : NO
  71. * Default : :variable:`CPACK_PACKAGE_HOMEPAGE_URL`
  72. .. variable:: CPACK_NUGET_PACKAGE_LICENSEURL
  73. CPACK_NUGET_<compName>_PACKAGE_LICENSEURL
  74. A URL for the package's license, often shown in UI displays as well
  75. as nuget.org_.
  76. * Mandatory : NO
  77. * Default : -
  78. .. variable:: CPACK_NUGET_PACKAGE_ICONURL
  79. CPACK_NUGET_<compName>_PACKAGE_ICONURL
  80. A URL for a 64x64 image with transparency background to use as the
  81. icon for the package in UI display.
  82. * Mandatory : NO
  83. * Default : -
  84. .. variable:: CPACK_NUGET_PACKAGE_DESCRIPTION_SUMMARY
  85. CPACK_NUGET_<compName>_PACKAGE_DESCRIPTION_SUMMARY
  86. A short description of the package for UI display. If omitted, a
  87. truncated version of description is used.
  88. * Mandatory : NO
  89. * Default : :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
  90. .. variable:: CPACK_NUGET_PACKAGE_RELEASE_NOTES
  91. CPACK_NUGET_<compName>_PACKAGE_RELEASE_NOTES
  92. A description of the changes made in this release of the package,
  93. often used in UI like the Updates tab of the Visual Studio Package
  94. Manager in place of the package description.
  95. * Mandatory : NO
  96. * Default : -
  97. .. variable:: CPACK_NUGET_PACKAGE_COPYRIGHT
  98. CPACK_NUGET_<compName>_PACKAGE_COPYRIGHT
  99. Copyright details for the package.
  100. * Mandatory : NO
  101. * Default : -
  102. .. variable:: CPACK_NUGET_PACKAGE_TAGS
  103. CPACK_NUGET_<compName>_PACKAGE_TAGS
  104. A space-delimited list of tags and keywords that describe the
  105. package and aid discoverability of packages through search and
  106. filtering.
  107. * Mandatory : NO
  108. * Default : -
  109. .. variable:: CPACK_NUGET_PACKAGE_DEPENDENCIES
  110. CPACK_NUGET_<compName>_PACKAGE_DEPENDENCIES
  111. A list of package dependencies.
  112. * Mandatory : NO
  113. * Default : -
  114. .. variable:: CPACK_NUGET_PACKAGE_DEPENDENCIES_<dependency>_VERSION
  115. CPACK_NUGET_<compName>_PACKAGE_DEPENDENCIES_<dependency>_VERSION
  116. A `version specification`_ for the particular dependency, where
  117. ``<dependency>`` is an item of the dependency list (see above)
  118. transformed with ``MAKE_C_IDENTIFIER`` function of :command:`string`
  119. command.
  120. * Mandatory : NO
  121. * Default : -
  122. .. variable:: CPACK_NUGET_PACKAGE_DEBUG
  123. Enable debug messages while executing CPack NuGet generator.
  124. * Mandatory : NO
  125. * Default : OFF
  126. .. _nuget.org: http://nuget.org
  127. .. _version specification: https://docs.microsoft.com/en-us/nuget/reference/package-versioning#version-ranges-and-wildcards
  128. .. NuGet spec docs https://docs.microsoft.com/en-us/nuget/reference/nuspec