From 56c9e95b04b51def7443a514e5021fa7b70fe8c8 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Sat, 4 Apr 2020 17:39:39 -0400 Subject: Implicit dependency fallback when a subproject wrap or dir exists --- docs/markdown/snippets/implicit_fallback.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/markdown/snippets/implicit_fallback.md (limited to 'docs/markdown/snippets') 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`. -- cgit v1.1 From 2a7f72885ff0623a0a625efb5ffeca6299fc4cf7 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Sat, 4 Apr 2020 23:56:33 -0400 Subject: wrap: Add 'provide' section --- docs/markdown/snippets/implicit_fallback.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/implicit_fallback.md b/docs/markdown/snippets/implicit_fallback.md index 87003d0..bad1c71 100644 --- a/docs/markdown/snippets/implicit_fallback.md +++ b/docs/markdown/snippets/implicit_fallback.md @@ -7,3 +7,10 @@ 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). -- cgit v1.1 From f08eed37cb69ba0d793c0f1d086eaef7f25c2ea3 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 20 Apr 2020 19:14:49 -0400 Subject: find_program: Fallback if a wrap file provide the program name We don't need the legacy variable name system as for dependency() fallbacks because meson.override_find_program() is largely used already, so we can just rely on it. --- docs/markdown/snippets/implicit_fallback.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/implicit_fallback.md b/docs/markdown/snippets/implicit_fallback.md index bad1c71..3d5a833 100644 --- a/docs/markdown/snippets/implicit_fallback.md +++ b/docs/markdown/snippets/implicit_fallback.md @@ -14,3 +14,8 @@ 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. -- cgit v1.1