From 586be530f0782499088708e34cf05073924ecb9c Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 18 Jul 2018 13:46:29 +0200 Subject: meson: fix usage of system-wide catch Signed-off-by: Igor Gnatenko --- meson.build | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 148fadf..c81fbbf 100644 --- a/meson.build +++ b/meson.build @@ -113,23 +113,19 @@ pkg.generate( ) if get_option('tests') or get_option('offline-tests') - # FIXME - _inc_catch = include_directories('/usr/include/catch') - if not cxx.has_header('catch.hpp', include_directories : _inc_catch) - error('Can\'t find catch.hpp') - endif + dep_catch = dependency('catch') _catch = static_library( 'catch', sources : [ 'unittest/catch_main.cpp', ], - include_directories : [ - _inc_catch, + dependencies : [ + dep_catch, ], ) _dep_catch = declare_dependency( link_with : _catch, - include_directories : _inc_catch, + dependencies : dep_catch, ) endif -- cgit v1.2.3