From 917ecfcb04a5b43b295dd903ad0c3424b37b751d Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 8 Jan 2019 20:05:09 +0200 Subject: [PATCH] meson: better error for test-junit-xml dep Helps people avoid libxml if they... want to? Signed-off-by: Pekka Paalanen --- tests/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index 980062c0..ebd3872a 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -52,7 +52,11 @@ exe_plugin_test = shared_library( deps_zuc = [ dep_libshared ] if get_option('test-junit-xml') - deps_zuc += [ dependency('libxml-2.0', version: '>= 2.6') ] + d = dependency('libxml-2.0', version: '>= 2.6', required: false) + if not d.found() + error('JUnit XML support requires libxml-2.0 >= 2.6 which was not found. Or, you can use \'-Dtest-junit-xml=false\'.') + endif + deps_zuc += d config_h.set('ENABLE_JUNIT_XML', '1') endif