From fde514ccb07f2fd955ac53e5e46e8c295b70f6ba Mon Sep 17 00:00:00 2001 From: Charles Brunet Date: Thu, 1 May 2025 15:28:28 -0400 Subject: Add license keyword to pkgconfig generate Fixes #14270. --- docs/markdown/Pkgconfig-module.md | 4 ++++ docs/markdown/snippets/pkgconfig-gen-license.md | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 docs/markdown/snippets/pkgconfig-gen-license.md (limited to 'docs') diff --git a/docs/markdown/Pkgconfig-module.md b/docs/markdown/Pkgconfig-module.md index 80882cb7d..7ddd31026 100644 --- a/docs/markdown/Pkgconfig-module.md +++ b/docs/markdown/Pkgconfig-module.md @@ -47,6 +47,7 @@ keyword arguments. `pkgconfig.generate()` was used on to put in the `Requires` field - `requires_private` the same as `requires` but for the `Requires.private` field - `url` a string with a url for the library +- `license` (*Since 1.9.0*) a string with a SPDX license to add to the generated file. - `variables` a list of strings with custom variables to add to the generated file. The strings must be in the form `name=value` and may reference other pkgconfig variables, @@ -90,6 +91,9 @@ application. That will cause pkg-config to prefer those builddir. This is an experimental feature provided on a best-effort basis, it might not work in all use-cases. +*Since 1.9.0* you can specify a license identifier. To use the current project +licence, simply use `license: meson.project_license()` as argument to `generate()`. + ### Implicit dependencies The exact rules followed to find dependencies that are implicitly diff --git a/docs/markdown/snippets/pkgconfig-gen-license.md b/docs/markdown/snippets/pkgconfig-gen-license.md new file mode 100644 index 000000000..c2e681818 --- /dev/null +++ b/docs/markdown/snippets/pkgconfig-gen-license.md @@ -0,0 +1,3 @@ +## Added license keyword to pkgconfig.generate + +When specified, it will add a `License:` attribute to the generated .pc file. -- cgit v1.2.3