diff --git a/examples/sm.puri.Handy.Example.json b/examples/sm.puri.Handy.Example.json index 0d1fabd4ae43cb119ced2a743061235b232b1dd0..c535dccbbe4aebfc7f7c8802ddf8e65147f38560 100644 --- a/examples/sm.puri.Handy.Example.json +++ b/examples/sm.puri.Handy.Example.json @@ -24,8 +24,8 @@ "builddir": true, "build-options": "examples", "config-opts": [ - "-Dglade_catalog=false", - "-Dintrospection=false", + "-Dglade_catalog=disabled", + "-Dintrospection=disabled", "-Dtests=false", "-Dvapi=false" ], diff --git a/glade/meson.build b/glade/meson.build index b5d690bc019c2d2bb55b8b9dadc08c5f704bbb7c..5351d7b5576d520208d50d05f357ac2b19d61f94 100644 --- a/glade/meson.build +++ b/glade/meson.build @@ -1,7 +1,6 @@ -if get_option('glade_catalog') +if glade_catalog glade_xml = 'libhandy.xml' -gladeui_dep = dependency('gladeui-2.0') module_dir = gladeui_dep.get_pkgconfig_variable('moduledir') dtd = join_paths(meson.current_source_dir(), 'glade-catalog.dtd') glade_catalogdir = gladeui_dep.get_pkgconfig_variable('catalogdir') diff --git a/meson.build b/meson.build index 1edc8ec1f1125e3636249994fe6992a0edae4b63..fc1c9424f40f69a896cdb1c0a658fb117a6538a2 100644 --- a/meson.build +++ b/meson.build @@ -118,6 +118,13 @@ else vapidir = join_paths(get_option('datadir'), 'vala', 'vapi') endif +glade_catalog_feature = get_option('glade_catalog') +gladeui_dep = dependency('gladeui-2.0', required : glade_catalog_feature) +glade_catalog = gladeui_dep.found() + +introspection_feature = get_option('introspection') +introspection = introspection_feature.enabled() or introspection_feature.auto() + gnome = import('gnome') subdir('src') @@ -143,9 +150,9 @@ summary = [ ' Tests: @0@'.format(get_option('tests')), ' Examples: @0@'.format(get_option('examples')), ' Documentation: @0@'.format(get_option('gtk_doc')), - ' Introspection: @0@'.format(get_option('introspection')), + ' Introspection: @0@'.format(introspection), ' Vapi: @0@'.format(get_option('vapi')), - ' Glade Catalog: @0@'.format(get_option('glade_catalog')), + ' Glade Catalog: @0@'.format(glade_catalog), '------', '' ] diff --git a/meson_options.txt b/meson_options.txt index 712771d2f845d0c6bf78b24d97ab35b12545a079..f0e09813a20f8f70623cd7028b7022038a3136b2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,7 @@ # Performance and debugging related options option('profiling', type: 'boolean', value: false) -option('introspection', type: 'boolean', value: true) +option('introspection', type: 'feature', value: 'auto') option('vapi', type: 'boolean', value: true) # Subproject @@ -21,5 +21,5 @@ option('examples', type: 'boolean', value: true, description: 'Whether to compile unit tests') -option('glade_catalog', type: 'boolean', value: true, +option('glade_catalog', type: 'feature', value: 'auto', description: 'Install a glade catalog file') diff --git a/src/meson.build b/src/meson.build index 1ec9ad438120a0555b3321278da103491288792e..d9d1c31335aa6cd47572b2aaaba2ee30ecafb002 100644 --- a/src/meson.build +++ b/src/meson.build @@ -156,7 +156,7 @@ libhandy_dep = declare_dependency( include_directories: include_directories('.'), ) -if get_option('introspection') +if introspection libhandy_gir = gnome.generate_gir(libhandy, sources: libhandy_generated_headers + libhandy_public_headers + libhandy_public_sources,