From af9afab821106ff92f2c8b38aa49d18a6724660b Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Wed, 20 May 2020 18:24:10 -0700 Subject: [PATCH] Support building against packaged libkainjow-mustache The Debian/Ubuntu package for mustache.hpp installs it to /usr/include/kainjow/mustache.hpp. Have meson look for it in that include directory as well before erroring out. Fixes #318. --- meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index c58767e4b..864b46a8a 100644 --- a/meson.build +++ b/meson.build @@ -25,7 +25,11 @@ pugixml_dep = dependency('pugixml', static:static_deps) libcurl_dep = dependency('libcurl', static:static_deps) microhttpd_dep = dependency('libmicrohttpd', static:static_deps) -if not compiler.has_header('mustache.hpp') +if compiler.has_header('mustache.hpp') + extra_include = [] +elif compiler.has_header('mustache.hpp', args: '-I/usr/include/kainjow') + extra_include = ['/usr/include/kainjow'] +else error('Cannot found header mustache.hpp') endif @@ -37,7 +41,7 @@ endif all_deps = [thread_dep, libicu_dep, libzim_dep, pugixml_dep, libcurl_dep, microhttpd_dep] -inc = include_directories('include') +inc = include_directories('include', extra_include) conf = configuration_data() conf.set('VERSION', '"@0@"'.format(meson.project_version()))