From 67c0ec1640369e20f9cea3fbdef873a4da3e47d3 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 21 Jul 2020 21:44:17 -0400 Subject: InternalDependency: Add as_link_whole() method --- docs/markdown/snippets/as_link_whole.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/markdown/snippets/as_link_whole.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/as_link_whole.md b/docs/markdown/snippets/as_link_whole.md new file mode 100644 index 0000000..39f1289 --- /dev/null +++ b/docs/markdown/snippets/as_link_whole.md @@ -0,0 +1,12 @@ +## `dep.as_link_whole()` + +Dependencies created with `declare_dependency()` now has new method `as_link_whole()`. +It returns a copy of the dependency object with all link_with arguments changed +to link_whole. This is useful for example for fallback dependency from a +subproject built with `default_library=static`. + +```meson +somelib = static_library('somelib', ...) +dep = declare_dependency(..., link_with: somelib) +library('someotherlib', ..., dependencies: dep.as_link_whole()) +``` -- cgit v1.1