mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 12:48:51 +00:00
meson: add option introspection
Add an option 'introspection' for meson which could control whether build GIR files or not. Signed-off-by: Kai Kang <kai.kang@windriver.com>
This commit is contained in:
parent
7cd1b02bcd
commit
1804de769c
@ -104,7 +104,8 @@ libsecret_dep = declare_dependency(
|
||||
)
|
||||
|
||||
# GObject Introspection
|
||||
libsecret_gir_sources = [
|
||||
if with_gir
|
||||
libsecret_gir_sources = [
|
||||
'secret-attributes.c',
|
||||
'secret-attributes.h',
|
||||
'secret-backend.c',
|
||||
@ -131,11 +132,11 @@ libsecret_gir_sources = [
|
||||
'secret-types.h',
|
||||
'secret-value.c',
|
||||
'secret-value.h',
|
||||
]
|
||||
libsecret_gir_sources += version_h
|
||||
libsecret_gir_sources += _enums_generated
|
||||
]
|
||||
libsecret_gir_sources += version_h
|
||||
libsecret_gir_sources += _enums_generated
|
||||
|
||||
libsecret_gir = gnome.generate_gir(libsecret,
|
||||
libsecret_gir = gnome.generate_gir(libsecret,
|
||||
sources: libsecret_gir_sources,
|
||||
namespace: 'Secret',
|
||||
nsversion: api_version_major,
|
||||
@ -144,10 +145,11 @@ libsecret_gir = gnome.generate_gir(libsecret,
|
||||
header: 'libsecret/secret.h',
|
||||
extra_args: [ '-D SECRET_COMPILATION'],
|
||||
install: true,
|
||||
)
|
||||
)
|
||||
endif
|
||||
|
||||
# Vapi
|
||||
if with_vapi
|
||||
if with_vapi and with_gir
|
||||
libsecret_vapi = gnome.generate_vapi('libsecret-@0@'.format(api_version_major),
|
||||
sources: libsecret_gir[0],
|
||||
metadata_dirs: meson.source_root() / 'libsecret',
|
||||
|
@ -22,6 +22,7 @@ with_gcrypt = get_option('gcrypt')
|
||||
enable_debug = get_option('debugging')
|
||||
with_vapi = get_option('vapi')
|
||||
with_gtkdoc = get_option('gtk_doc')
|
||||
with_gir = get_option('introspection')
|
||||
|
||||
# Some variables
|
||||
config_h_dir = include_directories('.')
|
||||
|
@ -3,3 +3,4 @@ option('gcrypt', type: 'boolean', value: true, description: 'With gcrypt and tra
|
||||
option('debugging', type: 'boolean', value: false, description: 'Turn debugging on/off')
|
||||
option('vapi', type: 'boolean', value: true, description: 'Create VAPI file.')
|
||||
option('gtk_doc', type: 'boolean', value: true, description: 'Build reference documentation using gtk-doc')
|
||||
option('introspection', type: 'boolean', value: true, description: 'Create GIR file.')
|
||||
|
Loading…
Reference in New Issue
Block a user