pull/6161/head
Michael Hirsch, Ph.D 5 years ago
parent 58b1157d87
commit a4e4d2e75a
No known key found for this signature in database
GPG Key ID: 6D23CDADAB0294F9
  1. 2
      docs/markdown/Reference-manual.md
  2. 4
      docs/markdown/snippets/native_property.md
  3. 4
      mesonbuild/interpreter.py

@ -1788,7 +1788,7 @@ the following methods.
if not cross compiling or the given property is not found.
- `get_external_property(propname, fallback_value, native: true/false)`
*(added 0.53.0)* returns the given property from a native or cross file.
*(added 0.54.0)* returns the given property from a native or cross file.
The optional fallback_value is returned if the given property is not found.
The optional `native: true` forces retrieving a variable from the
native file, even when cross-compiling.

@ -1,13 +1,13 @@
## Native file properties
As of Meson 0.53.0, the `--native-file nativefile.ini` can contain:
As of Meson 0.54.0, the `--native-file nativefile.ini` 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:
The `properties` are new for Meson 0.54.0, and are read like:
```meson
x = meson.get_external_property('foobar', 'foo')

@ -2037,8 +2037,8 @@ class MesonMain(InterpreterObject):
@noArgsFlattening
@permittedKwargs({'native'})
@FeatureNew('meson.get_external_property', '0.53.0')
def get_external_property_method(self, args: Sequence[str], kwargs: dict) -> str:
@FeatureNew('meson.get_external_property', '0.54.0')
def get_external_property_method(self, args: T.Sequence[str], kwargs: dict) -> str:
if len(args) < 1 or len(args) > 2:
raise InterpreterException('Must have one or two positional arguments.')
propname = args[0]

Loading…
Cancel
Save