diff options
-rw-r--r-- | docs/markdown/Reference-manual.md | 15 | ||||
-rw-r--r-- | test cases/common/166 get project license/meson.build | 6 |
2 files changed, 11 insertions, 10 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index ae0b9c9..3af78ef 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1398,13 +1398,14 @@ Project supports the following keyword arguments. specific options are used normally even in subprojects. -- `license`: takes a string or array of strings describing the - license(s) the code is under. Usually this would be something like - `license : 'GPL2+'`, but if the code has multiple licenses you can - specify them as an array like this: `license : ['proprietary', - 'GPL3']`. Note that the text is informal and is only written to - the dependency manifest. Meson does not do any license validation, - you are responsible for verifying that you abide by all licensing +- `license`: takes a string or array of strings describing the license(s) the + code is under. To avoid ambiguity it is recommended to use a standardized + license identifier from the [SPDX license list](https://spdx.org/licenses/). + Usually this would be something like `license : 'GPL-2.0-or-later'`, but if + the code has multiple licenses you can specify them as an array like this: + `license : ['proprietary', 'GPL-3.0-only']`. Note that the text is informal + and is only written to the dependency manifest. Meson does not do any license + validation, you are responsible for verifying that you abide by all licensing terms. You can access the value in your Meson build files with `meson.project_license()`. diff --git a/test cases/common/166 get project license/meson.build b/test cases/common/166 get project license/meson.build index 37303e3..e7e9deb 100644 --- a/test cases/common/166 get project license/meson.build +++ b/test cases/common/166 get project license/meson.build @@ -1,8 +1,8 @@ -project('bar', 'c', license: 'Apache') +project('bar', 'c', license: 'Apache-2.0') executable('bar', 'bar.c') license = meson.project_license()[0] -if license != 'Apache' - error('The license should be Apache, but it is: ' + license) +if license != 'Apache-2.0' + error('The license should be Apache-2.0, but it is: ' + license) endif |