diff options
| author | Charles Brunet <charles.brunet@optelgroup.com> | 2023-12-13 16:02:11 -0500 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2024-09-06 10:56:44 -0700 |
| commit | ce1602c1ee573f98ab409bcc645d9c7a07925836 (patch) | |
| tree | bcd69f82bdff413119ccbc80544dfeef37a8eb38 /docs | |
| parent | 0fc363021e5c2e79a68fb33e60b72b8ffd353875 (diff) | |
| download | meson-ce1602c1ee573f98ab409bcc645d9c7a07925836.tar.gz | |
alias_target with both_libs builds both
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/markdown/snippets/alias_target_of_both_libraries.md | 5 | ||||
| -rw-r--r-- | docs/markdown/snippets/dep_as_shared_as_static.md | 8 | ||||
| -rw-r--r-- | docs/yaml/functions/alias_target.yaml | 3 | ||||
| -rw-r--r-- | docs/yaml/objects/dep.yaml | 25 |
4 files changed, 41 insertions, 0 deletions
diff --git a/docs/markdown/snippets/alias_target_of_both_libraries.md b/docs/markdown/snippets/alias_target_of_both_libraries.md new file mode 100644 index 000000000..ab77a6556 --- /dev/null +++ b/docs/markdown/snippets/alias_target_of_both_libraries.md @@ -0,0 +1,5 @@ +## `alias_target` of `both_libraries` + +Previously, when passing a [[@both_libs]] object to [[alias_target]], the alias +would only point to the shared library. It now points to both the static and the +shared library. diff --git a/docs/markdown/snippets/dep_as_shared_as_static.md b/docs/markdown/snippets/dep_as_shared_as_static.md new file mode 100644 index 000000000..a84e9eeaa --- /dev/null +++ b/docs/markdown/snippets/dep_as_shared_as_static.md @@ -0,0 +1,8 @@ +## New `as_static` and `as_shared` methods on internal dependencies + +[[@dep]] object returned by [[declare_dependency]] now has `.as_static()` and +`.as_shared()` methods, to convert to a dependency that prefers the `static` +or the `shared` version of the linked [[@both_libs]] target. + +When the same dependency is used without those methods, the +`default_both_libraries` option determines which version is used. diff --git a/docs/yaml/functions/alias_target.yaml b/docs/yaml/functions/alias_target.yaml index bc14f84da..983356901 100644 --- a/docs/yaml/functions/alias_target.yaml +++ b/docs/yaml/functions/alias_target.yaml @@ -9,6 +9,9 @@ description: | are built. Dependencies can be any build target. Since 0.60.0, this includes [[@run_tgt]]. + *Since 1.6.0* passing a [[@both_libs]] object builds both shared and + static libraries. + posargs: target_name: type: str diff --git a/docs/yaml/objects/dep.yaml b/docs/yaml/objects/dep.yaml index 76543d2c1..28d93d79f 100644 --- a/docs/yaml/objects/dep.yaml +++ b/docs/yaml/objects/dep.yaml @@ -221,3 +221,28 @@ methods: pkgconfig_define: type: list[str] description: See [[dep.get_pkgconfig_variable]] + + - name: as_static + returns: dep + since: 1.6.0 + description: | + Only for dependencies created with [[declare_dependency]], + returns a copy of the dependency object that prefer the `static` version + of [[both_libraries]]. + kwargs: + recursive: + type: bool + description: If true, this is recursively applied to dependencies + + - name: as_shared + returns: dep + since: 1.6.0 + description: | + Only for dependencies created with [[declare_dependency]], + returns a copy of the dependency object that prefer the `shared` version + of [[both_libraries]]. + kwargs: + recursive: + type: bool + description: If true, this is recursively applied to dependencies +
\ No newline at end of file |
