Add VAPI (vala) support

This commit is contained in:
Felipe Borges 2023-04-17 12:33:33 +02:00
parent 188c63a183
commit 14c368d9e7
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

@ -128,7 +128,16 @@ if get_option('introspection').allowed()
namespace: 'Mks',
symbol_prefix: 'mks',
identifier_prefix: 'Mks',
includes: ['Gio-2.0', 'Gtk-4.0'],
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)