[json-glib] build: Rework the introspection option
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] build: Rework the introspection option
- Date: Tue, 5 Sep 2017 10:57:26 +0000 (UTC)
commit bc4748ec89ef04fe9de7024185d1e78609d13c15
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Sep 2 12:07:38 2017 +0100
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.
json-glib/meson.build | 2 ++
meson.build | 2 --
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)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]