aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-07-21 21:44:17 -0400
committerXavier Claessens <xclaesse@gmail.com>2020-09-14 20:32:22 -0400
commit67c0ec1640369e20f9cea3fbdef873a4da3e47d3 (patch)
tree1a20aad639427b0ec272c8b0873e92046a87f8a4 /docs/markdown/snippets
parentb872eea27f32e2d0b6767d7247cd43199b9ae41c (diff)
downloadmeson-67c0ec1640369e20f9cea3fbdef873a4da3e47d3.zip
meson-67c0ec1640369e20f9cea3fbdef873a4da3e47d3.tar.gz
meson-67c0ec1640369e20f9cea3fbdef873a4da3e47d3.tar.bz2
InternalDependency: Add as_link_whole() method
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/as_link_whole.md12
1 files changed, 12 insertions, 0 deletions
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())
+```