[vte/ricotz/vala] vala: Support building bindings for vte-2.91-gtk4
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/ricotz/vala] vala: Support building bindings for vte-2.91-gtk4
- Date: Sat, 5 Mar 2022 07:53:00 +0000 (UTC)
commit 6e879476200dd5cf5acc5be88caabeeb26d204c4
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Mar 5 08:49:17 2022 +0100
vala: Support building bindings for vte-2.91-gtk4
Fixes https://gitlab.gnome.org/GNOME/vte/-/issues/2546
bindings/meson.build | 2 +-
bindings/vala/meson.build | 20 +++++++++++++++++++-
2 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/bindings/meson.build b/bindings/meson.build
index 626e4679..2fc8dd60 100644
--- a/bindings/meson.build
+++ b/bindings/meson.build
@@ -22,6 +22,6 @@ if get_option('gir') and (get_option('gtk3') or get_option('gtk4'))
subdir('gir')
endif
-if get_option('vapi') and get_option('gtk3')
+if get_option('vapi') and (get_option('gtk3') or get_option('gtk4'))
subdir('vala')
endif
diff --git a/bindings/vala/meson.build b/bindings/vala/meson.build
index ec1ddf0b..415f561c 100644
--- a/bindings/vala/meson.build
+++ b/bindings/vala/meson.build
@@ -15,7 +15,6 @@
# along with this library. If not, see <https://www.gnu.org/licenses/>.
assert(get_option('gir'), 'gir is required for vala support')
-assert(get_option('gtk3'), 'vala support only available for gtk3')
add_languages('vala', required: true)
@@ -24,6 +23,24 @@ assert(valac.version().version_compare('>= 0.24.0'), 'vala >= 0.24 required')
posix_dep = valac.find_library('posix')
+if get_option('gtk4')
+libvte_gtk4_vapi_deps = [
+ 'gio-2.0',
+ 'glib-2.0',
+ 'graphene-1.0',
+ 'pango',
+ 'gtk4',
+]
+
+libvte_gtk4_vapi_dep = gnome.generate_vapi(
+ vte_gtk4_api_name,
+ sources: libvte_gtk4_gir[0],
+ packages: libvte_gtk4_vapi_deps,
+ install: true,
+)
+endif
+
+if get_option('gtk3')
libvte_gtk3_vapi_deps = [
'gio-2.0',
'glib-2.0',
@@ -98,3 +115,4 @@ vapp = executable(
vala_args: vapp_valaflags,
install: false,
)
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]