Document how to declare fallback-only dependencies [skip ci]

This commit is contained in:
Nirbheek Chauhan 2018-12-05 07:44:27 +05:30 committed by GitHub
parent 58b838a80b
commit febd3e8524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -420,7 +420,9 @@ If dependency_name is `''`, the dependency is always not found. So with
`found()` method returns `false`, and which can be passed like any other
dependency to the `dependencies:` keyword argument of a `build_target`. This
can be used to implement a dependency which is sometimes not required e.g. in
some branches of a conditional.
some branches of a conditional, or with a `fallback:` kwarg, can be used to
declare an optional dependency that only looks in the specified subproject,
and only if that's allowed by `--wrap-mode`.
The returned object also has methods that are documented in the
[object methods section](#dependency-object) below.