diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-03-07 21:20:43 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-03-07 21:49:24 -0500 |
commit | 87f820287a8e8caeb482c4601ca8cc87baa31092 (patch) | |
tree | cbe400f91cd7bde4177a6fcae4192ced17d34cad /meson.build | |
parent | 30586d75acae8ab45ffd4ad58a1855ea5c58ac8a (diff) | |
download | gtk+-87f820287a8e8caeb482c4601ca8cc87baa31092.tar.gz |
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.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 7 |
1 files changed, 6 insertions, 1 deletions
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() |