[libsoup/wip/meson: 56/93] Build Vala bindings



commit 3b2d83e744e87a095f3fabc0ff98634c931a35f2
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Nov 6 10:17:28 2017 +0100

    Build Vala bindings

 libsoup/meson.build |   14 ++++++++++----
 meson_options.txt   |    6 ++++++
 2 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/libsoup/meson.build b/libsoup/meson.build
index e26a320..93a61a0 100644
--- a/libsoup/meson.build
+++ b/libsoup/meson.build
@@ -215,7 +215,7 @@ if cdata.get('BUILD_LIBSOUP_GNOME')
     dependencies : deps + [libsoup_dep])
 endif
 
-if get_option('enable-introspection')
+if get_option('enable-introspection') or get_option('enable-vala')
   soup_introspection_sources = [
     'soup-address.c',
     'soup-address.h',
@@ -364,6 +364,14 @@ if get_option('enable-introspection')
     dependencies : deps,
     sources : soup_gir_gen_sources)
 
+  if get_option('enable-vala')
+    gnome.generate_vapi('libsoup-2.4',
+      sources : [soup_gir_gen_sources[0][0]],
+      packages : ['gio-2.0'],
+      install : true,
+    )
+  endif
+
   if get_option('enable-gnome')
     gir_gnome_args = libsoup_c_args + [
       '--identifier-prefix=Soup',
@@ -387,9 +395,7 @@ if get_option('enable-introspection')
       export_packages : 'libsoup-gnome-2.4',
       extra_args : gir_gnome_args,
       dependencies : [deps, libsoup, libsoup_gnome, soup_gir_gen_dep],
-      includes : [
-        'Gio-2.0',
-      ],
+      includes : ['Gio-2.0'],
       install : true,
     )
   endif
diff --git a/meson_options.txt b/meson_options.txt
index 4295665..6ba39ea 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -39,3 +39,9 @@ option('enable-introspection',
   value : true,
   description : 'Build GObject Introspection data'
 )
+
+option('enable-vala',
+  type : 'boolean',
+  value : false,
+  description : 'Build Vala bindings'
+)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]