diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2022-03-04 15:26:50 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2022-03-07 12:33:33 -0800 |
| commit | 9cf7a125613f8cc929828780b8c7aefd0d3ee4ac (patch) | |
| tree | 411a5ce09688f2a466871f2bf36b735c0ae53690 /docs/yaml/functions | |
| parent | 038d0723647f58d62754afb8f4dca7dc716a5ba8 (diff) | |
| download | meson-9cf7a125613f8cc929828780b8c7aefd0d3ee4ac.tar.gz | |
docs: Add docs for structured_sources
Diffstat (limited to 'docs/yaml/functions')
| -rw-r--r-- | docs/yaml/functions/_build_target_base.yaml | 2 | ||||
| -rw-r--r-- | docs/yaml/functions/structured_sources.yaml | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/docs/yaml/functions/_build_target_base.yaml b/docs/yaml/functions/_build_target_base.yaml index 68df5d85f..4db37f4d8 100644 --- a/docs/yaml/functions/_build_target_base.yaml +++ b/docs/yaml/functions/_build_target_base.yaml @@ -49,7 +49,7 @@ kwargs: eg: `cpp_args` for C++ sources: - type: str | file | custom_tgt | custom_idx | generated_list + type: str | file | custom_tgt | custom_idx | generated_list | structured_src description: Additional source files. Same as the source varargs. build_by_default: diff --git a/docs/yaml/functions/structured_sources.yaml b/docs/yaml/functions/structured_sources.yaml new file mode 100644 index 000000000..a5f0a83f3 --- /dev/null +++ b/docs/yaml/functions/structured_sources.yaml @@ -0,0 +1,21 @@ +name: structured_sources +returns: structured_src +since: 0.62.0 +description: | + Create a StructuredSource object, which is opaque and may be passed as a source + to any build_target (including static_library, shared_library, executable, + etc.). This is useful for languages like Rust, which use the filesystem layout + to determine import names. This is only allowed in Rust targets, and cannot be + mixed with non structured inputs. + +posargs: + root: + type: list[str | file | custom_tgt | custom_idx | generated_list] + description: Sources to put at the root of the generated structure + +optargs: + additional: + type: dict[str | file | custom_tgt | custom_idx | generated_list] + description: | + Additional sources, where the key is the directory under the root to place + the values |
