Commit 1804de76 authored by Kai Kang's avatar Kai Kang

meson: add option introspection

Add an option 'introspection' for meson which could control whether
build GIR files or not.
Signed-off-by: default avatarKai Kang <kai.kang@windriver.com>
parent 7cd1b02b
...@@ -104,50 +104,52 @@ libsecret_dep = declare_dependency( ...@@ -104,50 +104,52 @@ libsecret_dep = declare_dependency(
) )
# GObject Introspection # GObject Introspection
libsecret_gir_sources = [ if with_gir
'secret-attributes.c', libsecret_gir_sources = [
'secret-attributes.h', 'secret-attributes.c',
'secret-backend.c', 'secret-attributes.h',
'secret-backend.h', 'secret-backend.c',
'secret-collection.c', 'secret-backend.h',
'secret-collection.h', 'secret-collection.c',
'secret-item.c', 'secret-collection.h',
'secret-item.h', 'secret-item.c',
'secret-methods.c', 'secret-item.h',
'secret-password.c', 'secret-methods.c',
'secret-password.h', 'secret-password.c',
'secret-paths.c', 'secret-password.h',
'secret-paths.h', 'secret-paths.c',
'secret-prompt.c', 'secret-paths.h',
'secret-prompt.h', 'secret-prompt.c',
'secret-retrievable.c', 'secret-prompt.h',
'secret-retrievable.h', 'secret-retrievable.c',
'secret-schema.c', 'secret-retrievable.h',
'secret-schema.h', 'secret-schema.c',
'secret-schemas.c', 'secret-schema.h',
'secret-schemas.h', 'secret-schemas.c',
'secret-service.c', 'secret-schemas.h',
'secret-service.h', 'secret-service.c',
'secret-types.h', 'secret-service.h',
'secret-value.c', 'secret-types.h',
'secret-value.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,
sources: libsecret_gir_sources, libsecret_gir = gnome.generate_gir(libsecret,
namespace: 'Secret', sources: libsecret_gir_sources,
nsversion: api_version_major, namespace: 'Secret',
export_packages: 'libsecret-@0@'.format(api_version_major), nsversion: api_version_major,
includes: [ 'GObject-2.0', 'Gio-2.0' ], export_packages: 'libsecret-@0@'.format(api_version_major),
header: 'libsecret/secret.h', includes: [ 'GObject-2.0', 'Gio-2.0' ],
extra_args: [ '-D SECRET_COMPILATION'], header: 'libsecret/secret.h',
install: true, extra_args: [ '-D SECRET_COMPILATION'],
) install: true,
)
endif
# Vapi # Vapi
if with_vapi if with_vapi and with_gir
libsecret_vapi = gnome.generate_vapi('libsecret-@0@'.format(api_version_major), libsecret_vapi = gnome.generate_vapi('libsecret-@0@'.format(api_version_major),
sources: libsecret_gir[0], sources: libsecret_gir[0],
metadata_dirs: meson.source_root() / 'libsecret', metadata_dirs: meson.source_root() / 'libsecret',
......
...@@ -22,6 +22,7 @@ with_gcrypt = get_option('gcrypt') ...@@ -22,6 +22,7 @@ with_gcrypt = get_option('gcrypt')
enable_debug = get_option('debugging') enable_debug = get_option('debugging')
with_vapi = get_option('vapi') with_vapi = get_option('vapi')
with_gtkdoc = get_option('gtk_doc') with_gtkdoc = get_option('gtk_doc')
with_gir = get_option('introspection')
# Some variables # Some variables
config_h_dir = include_directories('.') config_h_dir = include_directories('.')
......
...@@ -3,3 +3,4 @@ option('gcrypt', type: 'boolean', value: true, description: 'With gcrypt and tra ...@@ -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('debugging', type: 'boolean', value: false, description: 'Turn debugging on/off')
option('vapi', type: 'boolean', value: true, description: 'Create VAPI file.') 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('gtk_doc', type: 'boolean', value: true, description: 'Build reference documentation using gtk-doc')
option('introspection', type: 'boolean', value: true, description: 'Create GIR file.')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment