diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Reference-manual.md | 4 | ||||
-rw-r--r-- | docs/markdown/snippets/implicit_fallback.md | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index dad8c12..293e41f 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -456,7 +456,9 @@ arguments: *(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. + of a list of 2 strings. *Since 0.55.0* the `fallback` keyword argument can be + omitted when there is a wrap file or a directory with the same `dependency_name`, + and subproject used `meson.override_dependency('dependency_name', subproj_dep)`. - `language` *(since 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/implicit_fallback.md b/docs/markdown/snippets/implicit_fallback.md new file mode 100644 index 0000000..87003d0 --- /dev/null +++ b/docs/markdown/snippets/implicit_fallback.md @@ -0,0 +1,9 @@ +## Implicit dependency fallback + +`dependency('foo')` now automatically fallback if the dependency is not found on +the system but a subproject wrap file or directory exists with the same name. + +That means that simply adding `subprojects/foo.wrap` is enough to add fallback +to any `dependency('foo')` call. It is however requires that the subproject call +`meson.override_dependency('foo', foo_dep)` to specify which dependency object +should be used for `foo`. |