aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Reference-manual.md4
-rw-r--r--docs/markdown/snippets/override_dependency.md6
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 09d54be..b4d2333 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -445,6 +445,10 @@ arguments:
[`dependency()`](#dependency), etc. Note that this means the
fallback dependency may be a not-found dependency, in which
case the value of the `required:` kwarg will be obeyed.
+ *Since 0.54.0* `'subproj_dep'` argument can be omitted in the case the
+ subproject used `meson.override_dependency('dependency_name', subproj_dep)`.
+ In that case, the `fallback` keyword argument can be a single string instead
+ of a list of 2 strings.
- `language` *(added 0.42.0)* defines what language-specific
dependency to find if it's available for multiple languages.
- `method` defines the way the dependency is detected, the default is
diff --git a/docs/markdown/snippets/override_dependency.md b/docs/markdown/snippets/override_dependency.md
index 875eef8..ca420bc 100644
--- a/docs/markdown/snippets/override_dependency.md
+++ b/docs/markdown/snippets/override_dependency.md
@@ -57,3 +57,9 @@ If the subproject does `dependency('foo')` but the main project wants to provide
its own implementation of `foo`, it can for example call
`meson.override_dependency('foo', declare_dependency(...))` before configuring the
subproject.
+
+## Simplified `dependency()` fallback
+
+In the case a subproject `foo` calls `meson.override_dependency('foo-2.0', foo_dep)`,
+the parent project can omit the dependency variable name in fallback keyword
+argument: `dependency('foo-2.0', fallback : 'foo')`.