From e36839818ace3e025c5a094a42feaf5154fb0d0a Mon Sep 17 00:00:00 2001 From: Evan Welsh Date: Fri, 9 Feb 2024 06:56:38 -0800 Subject: [PATCH] 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. --- girepository/compiler/meson.build | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/girepository/compiler/meson.build b/girepository/compiler/meson.build index 7ac3d936e..f724f32c5 100644 --- a/girepository/compiler/meson.build +++ b/girepository/compiler/meson.build @@ -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