diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2020-10-14 16:55:00 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2020-10-16 16:49:43 -0400 |
commit | 50387389beda3df666b3ef80811353b35f6d59fd (patch) | |
tree | 1d5d32a943aaf3eceb077951ff6485139f6981ff | |
parent | 213d670a106effd5ba2769049c2c80998bef666b (diff) | |
download | gdk-pixbuf-50387389beda3df666b3ef80811353b35f6d59fd.tar.gz |
meson: Change introspection option to feature type
This is more consistent with other modules like GTK.
-rw-r--r-- | gdk-pixbuf/meson.build | 4 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | meson_options.txt | 7 |
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', |