Commit bc4748ec authored by Emmanuele Bassi's avatar Emmanuele Bassi

build: Rework the introspection option

Instead of using `disable_introspection=false`, flip the condition
around, and use `enable-introspection=true`. This avoids the double
negative.

Additionally, we should drop the cross-compilation check; it's entirely
possible to cross-compile introspection data for different platforms and
architectures; this allows the Yocto project to drop a patch for
JSON-GLib.
parent ec2525b4
......@@ -84,6 +84,8 @@ pkgg.generate(libraries: [ json_lib ],
description: 'JSON Parser for GLib.',
requires: 'gio-2.0')
gir = find_program('g-ir-scanner', required: false)
build_gir = gir.found() and get_option('enable-introspection')
if build_gir
gir_args = [
'--quiet',
......
......@@ -156,8 +156,6 @@ endif
root_dir = include_directories('.')
gnome = import('gnome')
gir = find_program('g-ir-scanner', required: false)
build_gir = gir.found() and not meson.is_cross_build() and not get_option('disable_introspection')
python3 = import('python3').find_python()
gen_installed_test = files('build-aux/gen-installed-test.py')
......
option('disable_introspection',
type: 'boolean', value: false,
description: 'Whether to disable the introspection generation')
option('enable-introspection',
type: 'boolean', value: true,
description: 'Whether to generate introspection data (requires gobject-introspection)')
option('enable-gtk-doc',
type: 'boolean', value: false,
description: 'Whether to generate the API reference for JSON-GLib')
description: 'Whether to generate the API reference (requires gtk-doc)')
option('enable-man',
type: 'boolean', value: false,
description: 'Whether to generate the man pages for JSON-GLib tools')
description: 'Whether to generate man pages (requires xsltproc)')
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