This allows Meson native-file [properties] to be used. This avoids the need to call meson from a script file or have a long command line invocation of `meson setup` The method meson.get_native_property('prop', 'fallback') is added. The native file can contain properties like ``` [properties] myprop1 = 'foo' mydir2 = 'lib/custom' ``` Then from within `meson.build` ```meson x1 = meson.get_native_property('myprop1') thedir = meson.get_native_property('mydir2', 'libs') ``` fallback values are optionalpull/6161/head
parent
dc8d241583
commit
c2e6565029
4 changed files with 35 additions and 1 deletions
@ -0,0 +1,16 @@ |
||||
## Native file properties |
||||
|
||||
As of Meson 0.53.0, the `--native-file foo.txt` can contain: |
||||
|
||||
* binaries |
||||
* paths |
||||
* properties |
||||
|
||||
which are defined and used the same way as in cross files. |
||||
The `properties` are new for Meson 0.53.0, and are read like: |
||||
|
||||
```meson |
||||
x = meson.get_native_property('foobar', 'foo') |
||||
``` |
||||
|
||||
where `foobar` is the property name, and the optional `foo` is the fallback string value. |
Loading…
Reference in new issue