Commit 300fa5a0 authored by Xavier Claessens's avatar Xavier Claessens
Browse files

meson: Use a feature option for introspection

This copy the same behaviour as in gtk4 and all its dependencies. It fix
the build for example on Windows where gobject-introspection is not
usually available.
parent a51d9c2f
......@@ -59,7 +59,8 @@ testdatadir = join_paths(datadir, 'installed-tests', package_string)
docpath = join_paths(datadir, 'gtk-doc', 'html', package_string)
# Options
generate_gir = get_option('gir')
gir = find_program('g-ir-scanner', required : get_option('introspection'))
generate_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
generate_vapi = generate_gir and get_option('vapi')
build_gtk_doc = get_option('gtk_doc')
......
......@@ -2,8 +2,8 @@ option('install_tests',
type: 'boolean', value: false,
description: 'Install test programs')
option('gir',
type: 'boolean', value: true,
option('introspection',
type: 'feature', value: 'auto',
description: 'Generate gir data (requires gobject-introspection)')
option('vapi',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment