Browse Source

Merge topic 'project-license-doc' into release-4.2

ebf0a359ad Help: Improve documentation of project SPDX_LICENSE

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11348
Brad King 1 month ago
parent
commit
b5ec664401
1 changed files with 13 additions and 2 deletions
  1. 13 2
      Help/command/project.rst

+ 13 - 2
Help/command/project.rst

@@ -127,6 +127,17 @@ The options are:
   See the :prop_tgt:`SPDX_LICENSE` property for specifying the license(s) on
   individual software artifacts.
 
+  .. note::
+    The project license is *not* used to initialize the
+    :prop_tgt:`SPDX_LICENSE` property of individual targets.  This allows the
+    package license and default component license, which are specified when
+    exporting package information, to be meaningful.  Only |CPS| exports make
+    use of this information.
+
+    The project license *is* inherited as the package license in some cases.
+    Refer to the ``PROJECT`` option and related documentation of the
+    :command:`export` and :command:`install` commands for more information.
+
 .. _SPDX: https://spdx.dev/
 .. |SPDX| replace:: System Package Data Exchange
 
@@ -182,8 +193,6 @@ intended for use as default values in package metadata and documentation.
 The :command:`export` and :command:`install` commands use these accordingly
 when generating |CPS| package descriptions.
 
-.. |CPS| replace:: Common Package Specification
-
 .. _`Code Injection`:
 
 Code Injection
@@ -252,3 +261,5 @@ call exists, CMake will issue a warning and pretend there is a
   other commands whose behavior they may affect and for this reason the
   ``project()`` command will issue a warning if this order is not kept.
   See also policy :policy:`CMP0000`.
+
+.. |CPS| replace:: Common Package Specification