aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2017-04-15 14:30:43 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2017-04-15 18:33:55 +0300
commitb0576e055aa60a32bcf38aac4526257a01d57b17 (patch)
tree60265fc3fa1fb5acea3075fbd9d35edb88ccd26d
parentb48daeda1a53f0a1a218492e356186846a3abfff (diff)
downloadmeson-b0576e055aa60a32bcf38aac4526257a01d57b17.zip
meson-b0576e055aa60a32bcf38aac4526257a01d57b17.tar.gz
meson-b0576e055aa60a32bcf38aac4526257a01d57b17.tar.bz2
tests: skip protocol buffers test if deps are not found
-rw-r--r--test cases/frameworks/5 protocol buffers/meson.build9
1 files changed, 7 insertions, 2 deletions
diff --git a/test cases/frameworks/5 protocol buffers/meson.build b/test cases/frameworks/5 protocol buffers/meson.build
index 5c28344..c99e0a8 100644
--- a/test cases/frameworks/5 protocol buffers/meson.build
+++ b/test cases/frameworks/5 protocol buffers/meson.build
@@ -1,7 +1,12 @@
project('protocol buffer test', 'cpp')
-protoc = find_program('protoc')
-dep = dependency('protobuf')
+protoc = find_program('protoc', required : false)
+dep = dependency('protobuf', required : false)
+
+if not protoc.found() or not dep.found()
+ error('MESON_SKIP_TEST: protoc tool and/or protobuf pkg-config dependency not found')
+endif
+
gen = generator(protoc, \
output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'],