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')
)
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

View File

@ -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

View File

@ -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')