Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options to disable building introspection and vala bindings. #184

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions libxapp/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,18 @@ libxapp_dep = declare_dependency(
sources: [ xapp_headers, dbus_headers ]
)

gir = gnome.generate_gir(libxapp,
namespace: 'XApp',
nsversion: '1.0',
sources: xapp_headers + xapp_sources + dbus_headers + xapp_enums,
identifier_prefix: 'XApp',
symbol_prefix: 'xapp_',
export_packages: 'xapp',
includes: ['GObject-2.0', 'Gtk-3.0'],
install: true
)
if get_option('introspection')
gir = gnome.generate_gir(libxapp,
namespace: 'XApp',
nsversion: '1.0',
sources: xapp_headers + xapp_sources + dbus_headers + xapp_enums,
identifier_prefix: 'XApp',
symbol_prefix: 'xapp_',
export_packages: 'xapp',
includes: ['GObject-2.0', 'Gtk-3.0'],
install: true
)
endif

pkg.generate(
libraries: libxapp,
Expand All @@ -144,12 +146,16 @@ install_data(['xapp-glade-catalog.xml'],
install_dir : join_paths(get_option('datadir'), 'glade/catalogs')
)

gnome.generate_vapi('xapp',
packages: ['glib-2.0', 'gio-unix-2.0', 'gtk+-3.0'],
sources: gir[0],
metadata_dirs: meson.current_source_dir(),
install: true
)
if get_option('vapi')
assert(is_variable('gir'), 'vapi requires introspection to be enabled')

gnome.generate_vapi('xapp',
packages: ['glib-2.0', 'gio-unix-2.0', 'gtk+-3.0'],
sources: gir[0],
metadata_dirs: meson.current_source_dir(),
install: true
)
endif

if not app_lib_only
gtk3_module = shared_module(
Expand Down
5 changes: 4 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ top_inc = include_directories('.')
subdir('libxapp')
subdir('po')
subdir('schemas')
subdir('pygobject')

if get_option('introspection')
subdir('pygobject')
endif

if not app_lib_only
subdir('icons')
Expand Down
10 changes: 10 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,13 @@ option('xfce',
value: true,
description: 'Install xfce specific items.'
)
option('introspection',
type: 'boolean',
value: true,
description: 'Enable GObject Introspection.'
)
option('vapi',
type: 'boolean',
value: true,
description: 'Enable Vala bindings.'
)