Merge branch 'add-vala-support' into 'main'

Add VAPI (vala) support

See merge request chergert/libmks!11
This commit is contained in:
Christian Hergert 2023-04-20 20:46:21 +00:00
commit 15e6667292
3 changed files with 13 additions and 2 deletions

View File

@ -23,7 +23,7 @@ reference:
variables:
MESON_FLAGS: "-Dwerror=true --buildtype=release"
before_script:
- sudo dnf install -y gtk4-devel meson gcc gi-docgen gobject-introspection-devel
- sudo dnf install -y gtk4-devel meson gcc gi-docgen gobject-introspection-devel vala
script:
- mkdir -p pfx/
- meson ${MESON_FLAGS} --prefix=${PWD}/pfx -Ddocs=true _build

View File

@ -130,5 +130,14 @@ if get_option('introspection').allowed()
identifier_prefix: 'Mks',
includes: ['Gio-2.0', 'Gtk-4.0'],
install: true,
header: 'libmks-1.h'
)
if get_option('vapi')
libmks_vapi = gnome.generate_vapi('libmks-' + api_version,
sources: libmks_gir[0],
packages: [ 'gio-2.0', 'gtk4'],
install: true,
)
endif
endif

View File

@ -7,3 +7,5 @@ option('docs',
option('introspection',
type: 'feature', value: 'auto',
description: 'Generate gir data')
option('vapi', type: 'boolean', value: true)