From 87f820287a8e8caeb482c4601ca8cc87baa31092 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 7 Mar 2023 21:20:43 -0500 Subject: [PATCH] build: Handle introspection a bit better Error out if introspection is requested, but g-ir-scanner isn't found. And if introspection isn't explicitly disabled but is required for building the docs, build it. --- meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 07912b124e..e89ce6872a 100644 --- a/meson.build +++ b/meson.build @@ -728,8 +728,13 @@ endif # Introspection gir = find_program('g-ir-scanner', required : get_option('introspection')) -build_gir = gir.found() and get_option('introspection').enabled() +if not gir.found() and get_option('introspection').enabled() + error('Introspection enabled, but g-ir-scanner not found.') +endif + +build_gir = gir.found() and (get_option('introspection').enabled() or + (get_option('introspection').allowed() and get_option('gtk_doc'))) project_build_root = meson.current_build_dir() -- 2.30.2