[babl/wip/nielsdg/generate-vapi: 23/23] meson: Generate VAPI file



commit 3d5c9805ef1c95d58de8737cd9265aa9885a1f0e
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Mon Aug 12 06:58:56 2019 +0200

    meson: Generate VAPI file
    
    This can be used to call Babl from Vala. This is also very useful when
    we want to do the same thing (calling from vala) for GIMP 3.x

 .gitlab-ci.yml    | 1 +
 babl/meson.build  | 7 +++++++
 meson_options.txt | 1 +
 3 files changed, 9 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ded277426..bac765588 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,6 +10,7 @@ cache:
         base-devel
         git
         gobject-introspection
+        vala
         ${EXTRA_PKGS}
 
 .meson-build:
diff --git a/babl/meson.build b/babl/meson.build
index 542bb622a..6feb107ba 100644
--- a/babl/meson.build
+++ b/babl/meson.build
@@ -161,4 +161,11 @@ if get_option('enable-gir')
     header: 'babl.h',
     install: true,
   )
+
+  if get_option('enable-vapi')
+    gnome.generate_vapi(lib_name,
+      sources: babl_gir[0],
+      install: true,
+    )
+  endif
 endif
diff --git a/meson_options.txt b/meson_options.txt
index eca27beb6..639192786 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,5 +6,6 @@ option('enable-sse4_1', type: 'boolean', value: true, description: 'enable SSE4.
 option('enable-avx2',   type: 'boolean', value: true, description: 'enable AVX2 support')
 option('enable-f16c',   type: 'boolean', value: true, description: 'enable hardware half-float support')
 option('enable-gir',    type: 'boolean', value: true, description: 'enable GObject-Introspection (GIR)')
+option('enable-vapi',   type: 'boolean', value: true, description: 'enable Vala .vapi generation (requires 
GIR)')
 option('with-docs',     type: 'boolean', value: true, description: 'build website')
 option('with-lcms',     type: 'boolean', value: true, description: 'build with lcms')


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