From 2604201ae0f4f4e5b659d7af00684cb38d79c502 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 24 Sep 2020 21:00:34 +0200 Subject: [PATCH] src/meson.build: allow introspection when cross-compiling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit introspection can be enabled when cross-compiling on certains conditions (for example it is supported by buildroot) so, as suggested by Tim-Philipp Müller, disable it by default for cross builds unless the option was explicitly enabled by the user Signed-off-by: Fabrice Fontaine --- src/meson.build | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/meson.build b/src/meson.build index 192902451..de78e8c52 100644 --- a/src/meson.build +++ b/src/meson.build @@ -635,12 +635,7 @@ if have_gobject ) gir = find_program('g-ir-scanner', required: get_option('introspection')) - build_gir = gir.found() - - build_gir = build_gir and not meson.is_cross_build() - if not build_gir and get_option('introspection').enabled() - error('Introspection support is requested but it isn\'t available in cross builds') - endif + build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) build_gir = build_gir and get_option('default_library') != 'static' if not build_gir and get_option('introspection').enabled()