summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk-pixbuf/meson.build4
-rw-r--r--meson.build2
-rw-r--r--meson_options.txt7
3 files changed, 8 insertions, 5 deletions
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
index fdf98da52..d9a254f14 100644
--- a/gdk-pixbuf/meson.build
+++ b/gdk-pixbuf/meson.build
@@ -181,7 +181,9 @@ gdkpixbuf = library('gdk_pixbuf-2.0',
],
install: true)
-build_gir = get_option('gir')
+gir = find_program('g-ir-scanner', required : get_option('introspection'))
+build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
+
if build_gir
gir_args = [
'--quiet',
diff --git a/meson.build b/meson.build
index c1423ddba..a499ecaea 100644
--- a/meson.build
+++ b/meson.build
@@ -417,7 +417,7 @@ summary = [
'',
' documentation: @0@'.format(build_docs),
' man pages: @0@'.format(get_option('man')),
- ' introspection: @0@'.format(get_option('gir')),
+ ' introspection: @0@'.format(build_gir),
' installed tests: @0@'.format(get_option('installed_tests')),
' relocatable: @0@'.format(get_option('relocatable')),
'',
diff --git a/meson_options.txt b/meson_options.txt
index c1136cd96..930f3bdf8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -22,10 +22,11 @@ option('docs',
description: 'Whether to generate the whole documentation (see: gtk_doc and man options) [Deprecated]',
type: 'boolean',
value: false)
-option('gir',
+option('introspection',
description: 'Whether to generate the API introspection data (requires GObject-Introspection)',
- type: 'boolean',
- value: true)
+ type: 'feature',
+ value: 'auto',
+ yield: true)
option('man',
description: 'Whether to generate man pages (requires xlstproc)',
type: 'boolean',