diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-09-02 12:07:38 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-09-05 11:56:23 +0100 |
commit | bc4748ec89ef04fe9de7024185d1e78609d13c15 (patch) | |
tree | 8043da274c206e1cd4b178493ee3f720963885b3 | |
parent | ec2525b4aad70379387a95142ad09b396c660f0b (diff) | |
download | json-glib-bc4748ec89ef04fe9de7024185d1e78609d13c15.tar.gz |
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.
-rw-r--r-- | json-glib/meson.build | 2 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | meson_options.txt | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/json-glib/meson.build b/json-glib/meson.build index 45c3247..b229ad8 100644 --- a/json-glib/meson.build +++ b/json-glib/meson.build @@ -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', diff --git a/meson.build b/meson.build index 5d33c64..59ee0b1 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/meson_options.txt b/meson_options.txt index 4dc2a01..6c078cb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,9 +1,9 @@ -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)') |