diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-09-13 21:01:18 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-09-16 19:45:34 +0200 |
commit | eb1cac46823520eeadaf22e5be1fe3d3632e6e7e (patch) | |
tree | 40bd8b9609c3ccba84befd146c33a502d7cae487 | |
parent | 8f07b100060c5957a529a0f4a7d27189c59654e2 (diff) |
Add support to build vala bindings
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | meson_options.txt | 2 | ||||
-rw-r--r-- | src/libaccountsservice/meson.build | 10 |
3 files changed, 12 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64610f4..45abc9e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ build-fedora: image: fedora:latest before_script: - - dnf install -y gcc meson ninja-build gobject-introspection-devel glib-devel gtk-doc gettext-devel make polkit-devel redhat-rpm-config systemd-devel dbus-devel + - dnf install -y gcc meson ninja-build gobject-introspection-devel glib-devel gtk-doc gettext-devel make polkit-devel redhat-rpm-config systemd-devel dbus-devel vala script: - meson -Dgtk_doc=true _build - ninja -C _build all diff --git a/meson_options.txt b/meson_options.txt index 12e2f6b..3aab488 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,5 +10,7 @@ option('systemd', type: 'boolean', value: false, description: 'Use systemd') option('elogind', type: 'boolean', value: false, description: 'Use elogind') option('introspection', type: 'boolean', value: true, description: 'Enable introspection for this build') +option('vapi', type: 'boolean', value: true, description : 'Enable Vala bindings for this build') + option('docbook', type: 'boolean', value: false, description: 'build documentation (requires xmlto)') option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation') diff --git a/src/libaccountsservice/meson.build b/src/libaccountsservice/meson.build index 4e134db..615a015 100644 --- a/src/libaccountsservice/meson.build +++ b/src/libaccountsservice/meson.build @@ -95,7 +95,7 @@ pkg.generate( ) if get_option('introspection') - gnome.generate_gir( + as_gir_gen_sources = gnome.generate_gir( libaccountsservice, sources: sources + headers + [enum_sources[1]], includes: ['GObject-2.0', 'Gio-2.0'], @@ -106,4 +106,12 @@ if get_option('introspection') header: join_paths(subdir, 'act.h'), install: true, ) + + if get_option('vapi') + gnome.generate_vapi(act_name, + sources : as_gir_gen_sources[0], + packages : 'gio-2.0', + install : true, + ) + endif endif |