From cbbe455ba4f7da2d9056023d8e8647da96eeaf09 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Sep 2024 08:48:54 +0200 Subject: [PATCH] Document get_variable(system) --- docs/markdown/Dependencies.md | 4 ++-- docs/markdown/snippets/system_variable_in_dep.md | 3 +++ docs/yaml/objects/dep.yaml | 7 ++++++- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 docs/markdown/snippets/system_variable_in_dep.md diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md index a457342d1..3c3df1bcc 100644 --- a/docs/markdown/Dependencies.md +++ b/docs/markdown/Dependencies.md @@ -80,8 +80,8 @@ var = foo_dep.get_variable(cmake : 'CMAKE_VAR', pkgconfig : 'pkg-config-var', co ``` It accepts the keywords 'cmake', 'pkgconfig', 'pkgconfig_define', -'configtool', 'internal', and 'default_value'. 'pkgconfig_define' -works just like the 'define_variable' argument to +'configtool', 'internal', 'system', and 'default_value'. +'pkgconfig_define' works just like the 'define_variable' argument to `get_pkgconfig_variable`. When this method is invoked the keyword corresponding to the underlying type of the dependency will be used to look for a variable. If that variable cannot be found or if the caller diff --git a/docs/markdown/snippets/system_variable_in_dep.md b/docs/markdown/snippets/system_variable_in_dep.md new file mode 100644 index 000000000..0cd936322 --- /dev/null +++ b/docs/markdown/snippets/system_variable_in_dep.md @@ -0,0 +1,3 @@ +## Support for variable in system dependencies + +System Dependency method `get_variable()` now supports `system` variable. diff --git a/docs/yaml/objects/dep.yaml b/docs/yaml/objects/dep.yaml index 28d93d79f..ffd19f797 100644 --- a/docs/yaml/objects/dep.yaml +++ b/docs/yaml/objects/dep.yaml @@ -191,7 +191,7 @@ methods: since: 0.58.0 description: | This argument is used as a default value - for `cmake`, `pkgconfig`, `configtool` and `internal` keyword + for `cmake`, `pkgconfig`, `configtool`, `internal` and `system` 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')`. @@ -214,6 +214,11 @@ methods: since: 0.54.0 description: The internal variable name + system: + type: str + since: 1.6.0 + description: The system variable name + default_value: type: str description: The default value to return when the variable does not exist