meson: Generate VAPI file
authorNiels De Graef <nielsdegraef@gmail.com>
Mon, 12 Aug 2019 04:58:56 +0000 (06:58 +0200)
committerNiels De Graef <niels.degraef@barco.com>
Tue, 5 May 2020 10:34:51 +0000 (12:34 +0200)
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
babl/meson.build
meson_options.txt

index 6da021f862a035d2ba4650e0c48b4454337a9ad4..f98bb7b71aec8f3633614e57336038684f4f6f63 100644 (file)
@@ -17,6 +17,7 @@ cache:
         git
         gobject-introspection
         meson
+        vala
         ${EXTRA_PKGS}
   script:
     - meson _build
index 542bb622a365cc40c561f1f4bc2d89f2fed1cdce..6feb107ba14da25949ea3abaac67ad574368177b 100644 (file)
@@ -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
index eca27beb6ff4b823a312a3f0cb2e6150d2d78c18..6391927869fa329d2c79000bfdaffcf308c0f0a7 100644 (file)
@@ -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')