From 36aca4cd3ca7631765ef32478e5c85d32db11fca Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Wed, 17 Jan 2018 15:26:15 -0800 Subject: add meson.project_license() builtin This Fixes #2941. --- docs/markdown/Reference-manual.md | 5 ++++- docs/markdown/snippets/project-license.md | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 docs/markdown/snippets/project-license.md (limited to 'docs') diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index a3e1ef0..31c4953 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -910,7 +910,8 @@ Project supports the following keyword arguments. '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 - terms. + terms. You can access the value in your Meson build files with + `meson.project_license()`. - `meson_version` takes a string describing which Meson version the project requires. Usually something like `>0.28.0`. @@ -1247,6 +1248,8 @@ the following methods. - `project_version()` returns the version string specified in `project` function call. +- `project_license()` returns the array of licenses specified in `project` function call. + - `project_name()` returns the project name specified in the `project` function call. - `version()` return a string with the version of Meson. diff --git a/docs/markdown/snippets/project-license.md b/docs/markdown/snippets/project-license.md new file mode 100644 index 0000000..5da2c6a --- /dev/null +++ b/docs/markdown/snippets/project-license.md @@ -0,0 +1,4 @@ +## New method meson.project_license() + +The `meson` builtin object now has a `project_license()` method that returns a +list of all licenses for the project. -- cgit v1.1