build: Add an option to disable introspection

This commit is contained in:
Bilal Elmoussaoui 2023-03-30 13:14:41 +02:00
parent d342adf3ab
commit c7ba1c0104
3 changed files with 16 additions and 10 deletions

View File

@ -121,6 +121,7 @@ pkg.generate(
install_dir: join_paths(get_option('libdir'), 'pkgconfig') install_dir: join_paths(get_option('libdir'), 'pkgconfig')
) )
if get_option('introspection').allowed()
libmks_gir = gnome.generate_gir(libmks, libmks_gir = gnome.generate_gir(libmks,
sources: libmks_sources + libmks_headers, sources: libmks_sources + libmks_headers,
nsversion: api_version, nsversion: api_version,
@ -130,3 +131,4 @@ libmks_gir = gnome.generate_gir(libmks,
includes: ['Gio-2.0', 'Gtk-4.0'], includes: ['Gio-2.0', 'Gtk-4.0'],
install: true, install: true,
) )
endif

View File

@ -155,7 +155,7 @@ add_project_link_arguments(project_link_args, language: 'c')
subdir('lib') subdir('lib')
subdir('tools') subdir('tools')
if get_option('docs') if get_option('docs') and get_option('introspection').allowed()
subdir('docs') subdir('docs')
endif endif

View File

@ -3,3 +3,7 @@ option('install-tools', type: 'boolean', value: false)
option('docs', option('docs',
type: 'boolean', value: false, type: 'boolean', value: false,
description: 'Build reference manual') description: 'Build reference manual')
option('introspection',
type: 'feature', value: 'auto',
description: 'Generate gir data')