aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Pkgconfig-module.md3
-rw-r--r--docs/markdown/Reference-manual.md2
-rw-r--r--docs/markdown/snippets/pkg_idep_variables.md12
3 files changed, 15 insertions, 2 deletions
diff --git a/docs/markdown/Pkgconfig-module.md b/docs/markdown/Pkgconfig-module.md
index 7b68e24..e9aa4a2 100644
--- a/docs/markdown/Pkgconfig-module.md
+++ b/docs/markdown/Pkgconfig-module.md
@@ -49,7 +49,8 @@ keyword arguments.
generated file. The strings must be in the form `name=value` and may
reference other pkgconfig variables,
e.g. `datadir=${prefix}/share`. The names `prefix`, `libdir` and
- `includedir` are reserved and may not be used.
+ `includedir` are reserved and may not be used. *Since 0.56.0* it can also be a
+ dictionary.
- `version` a string describing the version of this library, used to set the
`Version:` field. (*since 0.46.0*) Defaults to the project version if unspecified.
- `d_module_versions` a list of module version flags used when compiling
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 38ae558..13111d1 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -427,7 +427,7 @@ keyword arguments:
- `version`: the version of this dependency, such as `1.2.3`
- `variables` *(since 0.54.0)*: a dictionary of arbitrary strings, this is meant to be used
in subprojects where special variables would be provided via cmake or
- pkg-config.
+ pkg-config. *since 0.56.0* it can also be a list of `'key=value'` strings.
### dependency()
diff --git a/docs/markdown/snippets/pkg_idep_variables.md b/docs/markdown/snippets/pkg_idep_variables.md
new file mode 100644
index 0000000..4e69b18
--- /dev/null
+++ b/docs/markdown/snippets/pkg_idep_variables.md
@@ -0,0 +1,12 @@
+## Consistency between `declare_dependency()` and `pkgconfig.generate()` variables
+
+The `variables` keyword argument in `declare_dependency()` used to only support
+dictionary and `pkgconfig.generate()` only list of strings. They now both support
+dictionary and list of strings in the format `'name=value'`. This makes easier
+to share a common set of variables for both:
+
+```meson
+vars = {'foo': 'bar'}
+dep = declare_dependency(..., variables: vars)
+pkg.generate(..., variables: vars)
+```