The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.0 KiB
29 lines
1.0 KiB
3 years ago
|
name: get_option
|
||
|
returns: str | int | bool | feature | list[str | int | bool]
|
||
|
description: |
|
||
|
Obtains the value of the [project build option](Build-options.md)
|
||
|
specified in the positional argument.
|
||
|
|
||
|
Note that the value returned for built-in options that end in `dir`
|
||
|
such as `bindir` and `libdir` is always a path relative to (and
|
||
|
inside) the `prefix`.
|
||
|
|
||
|
The only exceptions are: `sysconfdir`, `localstatedir`, and
|
||
|
`sharedstatedir` which will return the value passed during
|
||
|
configuration as-is, which may be absolute, or relative to `prefix`.
|
||
|
[`install_dir` arguments](Installing.md) handles that as expected, but
|
||
|
if you need the absolute path to one of these e.g. to use in a define
|
||
|
etc., you should use `get_option('prefix') /
|
||
|
get_option('localstatedir')`
|
||
|
|
||
|
For options of type `feature` a
|
||
|
[[@feature]] option object
|
||
|
is returned instead of a string.
|
||
|
See [`feature` options](Build-options.md#features)
|
||
|
documentation for more details.
|
||
|
|
||
|
posargs:
|
||
|
option_name:
|
||
|
type: str
|
||
|
description: Name of the option to query
|