build: Only override g-ir-compiler when GIR generation is enabled

GLib is used a subproject with GObject Introspection and overriding
this binary breaks that usage. For now we will make overriding the
binary conditional until Meson is updated to handle the binary changes.
This commit is contained in:
Evan Welsh 2024-02-09 06:56:38 -08:00
parent 3f4e6ddcd8
commit e36839818a

View File

@ -24,6 +24,10 @@ gicompilerepository = executable('gi-compile-repository', 'compiler.c',
c_args: custom_c_args,
)
# Replace the default g-ir-compiler target with the version we
# just built.
meson.override_find_program('g-ir-compiler', gicompilerepository)
# Only override the user-installed compiler if we need to generate the GIRs
# GLib, Gio, and GObject...
if enable_gir
# Replace the default g-ir-compiler target with the version we
# just built.
meson.override_find_program('g-ir-compiler', gicompilerepository)
endif