diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-04-27 00:27:52 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-04-27 00:57:40 -0400 |
commit | 0881b78bbabb5aab59b2abedf41b05d46c3f6e4d (patch) | |
tree | f6bd95e748c21aa5c0d1fb8963eea2aa2772ba4a /tools | |
parent | 137952c03abd2acd454b834d8cc7ae10915c8aa0 (diff) | |
download | gobject-introspection-0881b78bbabb5aab59b2abedf41b05d46c3f6e4d.tar.gz |
Don't override finding executables when using pre-built tools.
Actually, we shouldn't really need this. We are building `native: false`
binaries so when we look up a `native: true` binary the override should
not apply. I've fixed this upstream in meson in
https://github.com/NixOS/nixpkgs/pull/86080, though some backwards
compatibility migration might be in order.
In the meantime, we can make `gi_cross_use_host_gi` prevent the
overrides from happening, which will achieve the desired behavior.
Finally, this allows us to use `find_program` in `scanner_command`,
unconditionally, letting the presence of the override dictate whether a
freshly-built or pre-built `g-ir-scanner` is used.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/meson.build | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/meson.build b/tools/meson.build index 103480c4..50641c19 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -34,7 +34,9 @@ foreach tool : tools ) tool_output += tool_bin # Provide tools for others when we're a subproject and they use the Meson GNOME module - meson.override_find_program(tool[0], tool_bin) + if not get_option('gi_cross_use_host_gi') + meson.override_find_program(tool[0], tool_bin) + endif endforeach girscanner = tool_output[0] @@ -58,7 +60,6 @@ gircompiler = executable('g-ir-compiler', 'compiler.c', install: true, c_args: custom_c_args, ) -meson.override_find_program('g-ir-compiler', gircompiler) girgenerate = executable('g-ir-generate', 'generate.c', dependencies: [ @@ -68,11 +69,15 @@ girgenerate = executable('g-ir-generate', 'generate.c', install: true, c_args: custom_c_args, ) -meson.override_find_program('g-ir-generate', girgenerate) girinspect = executable('g-ir-inspect', 'g-ir-inspect.c', dependencies: girepo_dep, install: true, c_args: custom_c_args, ) -meson.override_find_program('g-ir-inspect', girinspect)
\ No newline at end of file + +if not get_option('gi_cross_use_host_gi') + meson.override_find_program('g-ir-compiler', gircompiler) + meson.override_find_program('g-ir-generate', girgenerate) + meson.override_find_program('g-ir-inspect', girinspect) +endif |