Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to disable building introspection and vala bindings.
Browse files Browse the repository at this point in the history
SparkyBluefang committed Jul 1, 2024

Verified

This commit was signed with the committer’s verified signature.
moodysalem Moody Salem
1 parent a83fd20 commit 00f52c9
Showing 3 changed files with 36 additions and 17 deletions.
38 changes: 22 additions & 16 deletions libxapp/meson.build
Original file line number Diff line number Diff line change
@@ -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,
@@ -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(
5 changes: 4 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -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')
10 changes: 10 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -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.'
)

0 comments on commit 00f52c9

Please sign in to comment.