aboutsummaryrefslogtreecommitdiff
path: root/docs/yaml/functions/declare_dependency.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/yaml/functions/declare_dependency.yaml')
-rw-r--r--docs/yaml/functions/declare_dependency.yaml59
1 files changed, 59 insertions, 0 deletions
diff --git a/docs/yaml/functions/declare_dependency.yaml b/docs/yaml/functions/declare_dependency.yaml
new file mode 100644
index 0000000..f043d1d
--- /dev/null
+++ b/docs/yaml/functions/declare_dependency.yaml
@@ -0,0 +1,59 @@
+name: declare_dependency
+returns: dep
+description: |
+ This function returns a [[@dep]] object that
+ behaves like the return value of [[dependency]] but is
+ internal to the current build. The main use case for this is in
+ subprojects. This allows a subproject to easily specify how it should
+ be used. This makes it interchangeable with the same dependency that
+ is provided externally by the system.
+
+kwargs:
+ compile_args:
+ type: list[str]
+ description: Compile arguments to use.
+
+ dependencies:
+ type: list[dep]
+ description: Other dependencies needed to use this dependency.
+
+ include_directories:
+ type: list[inc | str]
+ description: |
+ the directories to add to header search path,
+ must be [[@inc]] objects or *(since 0.50.0)* plain strings.
+
+ link_args:
+ type: list[str]
+ description: Link arguments to use.
+
+ link_with:
+ type: list[lib]
+ description: Libraries to link against.
+
+ link_whole:
+ type: list[lib]
+ since: 0.46.0
+ description: Libraries to link fully, same as [[executable]].
+
+ sources:
+ type: list[str | file]
+ description: |
+ sources to add to targets
+ (or generated header files
+ that should be built before sources including them are built)
+
+ version:
+ type: str
+ description: |
+ the version of this dependency,
+ such as `1.2.3`. Defaults to the project version.
+
+ variables:
+ type: dict[str] | list[str]
+ since: 0.54.0
+ description: |
+ a dictionary of arbitrary strings,
+ this is meant to be used
+ in subprojects where special variables would be provided via cmake or
+ pkg-config. *since 0.56.0* it can also be a list of `'key=value'` strings.