[vcpkg doc] Add identifier "license" (#22782)

* [vcpkg doc] Add identifier "license"

* moar docs

* add WITH

Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
This commit is contained in:
LilyWangLL 2022-01-27 07:21:13 +08:00 committed by GitHub
parent 173371c738
commit 08de4ddf99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -452,3 +452,52 @@ This field is optional and defaults to true.
```
This means "doesn't support uwp, nor arm32 (but does support arm64)".
### `"license"`
The license of the port. This is an [SPDX license expression],
using [SPDX license identifiers].
[SPDX license expression]: https://spdx.dev/ids/#how
[SPDX license identifiers]: https://spdx.org/licenses/
#### Examples
For libraries with simple licensing,
only one license identifier may be needed;
vcpkg, for example, would use this since it uses the MIT license:
```json
{
"license": "MIT"
}
```
Many GPL'd projects allow either the GPL 2 or any later versions:
```json
{
"license": "GPL-2.0-or-later"
}
```
Many Rust projects, in order to make certain they're useable with GPL,
but also desiring the MIT license, will allow licensing under either
the MIT license or Apache 2.0:
```json
{
"license": "Apache-2.0 OR MIT"
}
```
Some major projects include exceptions;
the Microsoft C++ standard library, and the LLVM project,
are licensed under Apache 2.0 with the LLVM exception:
```json
{
"license": "Apache-2.0 WITH LLVM-exception"
}
```