diff --git a/lib/meson.build b/lib/meson.build index 6b05eac..1402c32 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -121,12 +121,14 @@ pkg.generate( install_dir: join_paths(get_option('libdir'), 'pkgconfig') ) -libmks_gir = gnome.generate_gir(libmks, - sources: libmks_sources + libmks_headers, - nsversion: api_version, - namespace: 'Mks', - symbol_prefix: 'mks', - identifier_prefix: 'Mks', - includes: ['Gio-2.0', 'Gtk-4.0'], - install: true, -) +if get_option('introspection').allowed() + libmks_gir = gnome.generate_gir(libmks, + sources: libmks_sources + libmks_headers, + nsversion: api_version, + namespace: 'Mks', + symbol_prefix: 'mks', + identifier_prefix: 'Mks', + includes: ['Gio-2.0', 'Gtk-4.0'], + install: true, + ) +endif \ No newline at end of file diff --git a/meson.build b/meson.build index 846d632..16e8362 100644 --- a/meson.build +++ b/meson.build @@ -155,7 +155,7 @@ add_project_link_arguments(project_link_args, language: 'c') subdir('lib') subdir('tools') -if get_option('docs') +if get_option('docs') and get_option('introspection').allowed() subdir('docs') endif diff --git a/meson_options.txt b/meson_options.txt index 0500d4c..2662a8d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -3,3 +3,7 @@ option('install-tools', type: 'boolean', value: false) option('docs', type: 'boolean', value: false, description: 'Build reference manual') + +option('introspection', + type: 'feature', value: 'auto', + description: 'Generate gir data')