[gexiv2] meson.build: improve handling of vapi
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gexiv2] meson.build: improve handling of vapi
- Date: Wed, 16 Jan 2019 13:51:00 +0000 (UTC)
commit 5d69244e04c2e9e5ab414611c415526a68369526
Author: Marty E. Plummer <hanetzer startmail com>
Date: Sun Jan 13 13:33:32 2019 -0600
meson.build: improve handling of vapi
As it currently stands the vapi files are not generatable on linux
distros which do not provide unversioned valac/vapigen. Use instead
meson's add_languages function to handle detection of existing vala
toolchain, which will check the VALAC and VAPIGEN env vars.
Signed-off-by: Marty E. Plummer <hanetzer startmail com>
meson.build | 4 +---
test/meson.build | 14 +++++---------
2 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/meson.build b/meson.build
index b0f9045..209b3e9 100644
--- a/meson.build
+++ b/meson.build
@@ -15,11 +15,9 @@ gobject = dependency('gobject-2.0', version : '>= 2.38.0')
gio = dependency('gio-2.0', version : '>= 2.32.0')
gir = find_program('g-ir-scanner', required: false)
-vapigen = find_program('vapigen', required: false)
-vala = find_program('valac', required: false)
introspection_available = gir.found() and get_option('introspection')
-vapi_available = introspection_available and vapigen.found() and get_option('vapi')
+vapi_available = introspection_available and add_languages('vala', required: get_option('vapi')) and
get_option('vapi')
subdir('gexiv2')
diff --git a/test/meson.build b/test/meson.build
index a50f9df..9e99477 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -17,15 +17,11 @@ regression_test = executable('gexiv2-regression', 'gexiv2-regression.c',
test('regression', regression_test, env : test_env)
if vapi_available
- valac = find_program('valac')
- if valac.found()
- add_languages('vala')
- executable('gexiv2-dump',
- 'gexiv2-dump.vala',
- include_directories : include_directories('..'),
- dependencies : [gobject, vapi, gio],
- link_with : gexiv2)
- endif
+ executable('gexiv2-dump',
+ 'gexiv2-dump.vala',
+ include_directories : include_directories('..'),
+ dependencies : [gobject, vapi, gio],
+ link_with : gexiv2)
endif
if python2_available
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]