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,12 +121,14 @@ pkg.generate(
install_dir: join_paths(get_option('libdir'), 'pkgconfig') install_dir: join_paths(get_option('libdir'), 'pkgconfig')
) )
libmks_gir = gnome.generate_gir(libmks, if get_option('introspection').allowed()
sources: libmks_sources + libmks_headers, libmks_gir = gnome.generate_gir(libmks,
nsversion: api_version, sources: libmks_sources + libmks_headers,
namespace: 'Mks', nsversion: api_version,
symbol_prefix: 'mks', namespace: 'Mks',
identifier_prefix: 'Mks', symbol_prefix: 'mks',
includes: ['Gio-2.0', 'Gtk-4.0'], identifier_prefix: 'Mks',
install: true, includes: ['Gio-2.0', 'Gtk-4.0'],
) 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')