aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets/dep_get_variable.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/snippets/dep_get_variable.md')
-rw-r--r--docs/markdown/snippets/dep_get_variable.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/markdown/snippets/dep_get_variable.md b/docs/markdown/snippets/dep_get_variable.md
new file mode 100644
index 0000000..54373d9
--- /dev/null
+++ b/docs/markdown/snippets/dep_get_variable.md
@@ -0,0 +1,8 @@
+## `dep.get_variable(varname)`
+
+`dep.get_variable()` now has `varname` as first positional argument.
+It is used as default value for `cmake`, `pkgconfig`, `configtool` and `internal`
+keyword arguments. It is useful in the common case where `pkgconfig` and `internal`
+use the same variable name, in which case it's easier to write `dep.get_variable('foo')`
+instead of `dep.get_variable(pkgconfig: 'foo', internal: 'foo')`.
+