Sat, 12 May 2018 12:57:09 -0500
meson: Add introspection option for disabling GObject Introspection
| meson.build | file | annotate | diff | comparison | revisions | |
| meson_options.txt | file | annotate | diff | comparison | revisions |
--- a/meson.build Sat May 12 06:50:47 2018 +0000 +++ b/meson.build Sat May 12 12:57:09 2018 -0500 @@ -905,16 +905,23 @@ gplugin = dependency('gplugin', version : '>= 0.0.17') # GPLUGIN_REQ sets pkg-config requirements in the .pc file GPLUGIN_REQ = ['gplugin'] - enable_introspection = dependency('gobject-introspection-1.0', - version : '>= 1.30.0', required : false).found() else gplugin = [] GPLUGIN_REQ = [] - enable_introspection = false endif +####################################################################### +# Check for GObject Introspection +####################################################################### + +enable_introspection = get_option('introspection') if enable_introspection - conf.set('ENABLE_INTROSPECTION', true) + if dependency('gobject-introspection-1.0', version : '>= 1.30.0', + required : force_deps).found() + conf.set('ENABLE_INTROSPECTION', true) + else + enable_introspection = false + endif endif #######################################################################
--- a/meson_options.txt Sat May 12 06:50:47 2018 +0000 +++ b/meson_options.txt Sat May 12 12:57:09 2018 -0500 @@ -71,6 +71,9 @@ option('plugins', type : 'boolean', value : true, description : 'compile with plugin support') +option('introspection', type : 'boolean', value : true, + description : 'build introspection data') + option('krb4', type : 'boolean', value : false, description : 'compile Zephyr plugin with Kerberos 4 support')