aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-07-01 18:14:34 +0300
committerGitHub <noreply@github.com>2020-07-01 18:14:34 +0300
commit026e386ec2bd79fbf4fcd21e93df19c5a22f3ebf (patch)
treece997fb9df71fa4463f746c1c787168147839392 /docs/markdown/snippets
parent14cc2efcfef9a404498b3532ffa8130cc092f6f6 (diff)
parent576493982da325a739f04e5455ef0643b49d94f1 (diff)
downloadmeson-026e386ec2bd79fbf4fcd21e93df19c5a22f3ebf.zip
meson-026e386ec2bd79fbf4fcd21e93df19c5a22f3ebf.tar.gz
meson-026e386ec2bd79fbf4fcd21e93df19c5a22f3ebf.tar.bz2
Merge pull request #6902 from xclaesse/auto-fallback
Implicit dependency fallback when a subproject wrap or dir exists
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/implicit_fallback.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/markdown/snippets/implicit_fallback.md b/docs/markdown/snippets/implicit_fallback.md
new file mode 100644
index 0000000..3d5a833
--- /dev/null
+++ b/docs/markdown/snippets/implicit_fallback.md
@@ -0,0 +1,21 @@
+## 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`.
+
+## Wrap file `provide` section
+
+Wrap files can define the dependencies it provides in the `[provide]` section.
+When a wrap file provides the dependency `foo` any call do `dependency('foo')`
+will automatically fallback to that subproject even if no `fallback` keyword
+argument is given. See [Wrap documentation](Wrap-dependency-system-manual.md#provide_section).
+
+## `find_program()` fallback
+
+When a program cannot be found on the system but a wrap file has its name in the
+`[provide]` section, that subproject will be used as fallback.