summaryrefslogtreecommitdiff
path: root/docs/yaml/objects/subproject.yaml
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2021-08-21 16:27:56 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2021-10-03 11:46:34 +0200
commit2b482e39a90fa1929e0fa4006861f4264f28adb2 (patch)
tree0af5ef229d25bef1b974445406fc3c9d28c0756f /docs/yaml/objects/subproject.yaml
parentad65a699f93a7659739287882ca27c58c564670b (diff)
downloadmeson-2b482e39a90fa1929e0fa4006861f4264f28adb2.tar.gz
docs: Add the YAML Reference manual
Diffstat (limited to 'docs/yaml/objects/subproject.yaml')
-rw-r--r--docs/yaml/objects/subproject.yaml30
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/yaml/objects/subproject.yaml b/docs/yaml/objects/subproject.yaml
new file mode 100644
index 000000000..d84e3f066
--- /dev/null
+++ b/docs/yaml/objects/subproject.yaml
@@ -0,0 +1,30 @@
+name: subproject
+long_name: Subproject object
+description: This object is returned by [[subproject]] and is an opaque object representing it.
+
+methods:
+- name: found
+ returns: bool
+ since: 0.48.0
+ description: Returns whether the subproject was successfully setup.
+
+- name: get_variable
+ returns: any
+ description: |
+ fetches the specified variable from inside the subproject.
+ This is useful to, for instance, get a
+ [[declare_dependency]] from the [subproject](Subprojects.md).
+
+ If the variable does not exist, the variable `fallback` is returned.
+ If a fallback is not specified, then attempting to read a non-existing
+ variable will cause a fatal error.
+
+ posargs:
+ var_name:
+ type: str
+ description: The name of the variable to query
+
+ optargs:
+ fallback:
+ type: any
+ description: The fallback value to return if `var_name` does not exist.