Document get_variable(system)

pull/13703/head
unknown 2 months ago committed by Dylan Baker
parent c8b463491c
commit cbbe455ba4
  1. 4
      docs/markdown/Dependencies.md
  2. 3
      docs/markdown/snippets/system_variable_in_dep.md
  3. 7
      docs/yaml/objects/dep.yaml

@ -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

@ -0,0 +1,3 @@
## Support for variable in system dependencies
System Dependency method `get_variable()` now supports `system` variable.

@ -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

Loading…
Cancel
Save