diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2021-11-19 12:51:06 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2021-11-19 12:51:06 +0000 |
commit | 6120c5bb0951383284caf1031b9d56b4b40fbc86 (patch) | |
tree | 0b2ca40c8b0ff8af1f07a0db123e53941c346e2f | |
parent | 93cf9c578b95d685cd7b8197993c0be0f89e6348 (diff) | |
download | libgweather-6120c5bb0951383284caf1031b9d56b4b40fbc86.tar.gz |
build: Error out if enabled Vala bindings can't be built
If the Vala bindings were explicitly enabled but cannot be built because
of a missing dependency, we should error out immediately.
-rw-r--r-- | libgweather/meson.build | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libgweather/meson.build b/libgweather/meson.build index b9371b8..c061bd7 100644 --- a/libgweather/meson.build +++ b/libgweather/meson.build @@ -204,6 +204,14 @@ enable_vala = get_option('enable_vala') vapigen = find_program('vapigen', required: enable_vala == 'true') if enable_vala == 'auto' or enable_vala == 'true' build_vapi = vapigen.found() and get_option('introspection') + if enable_vala == 'true' and not build_vapi + if not vapigen.found() + msg = 'vapigen not found' + elif not get_option('introspection') + msg = 'introspection disabled' + endif + error('Vala bindings were enabled but cannot be generated: @0@'.format(msg)) + endif else build_vapi = false endif |