Skip to content

Commit

Permalink
Support building against packaged libkainjow-mustache
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
legoktm authored and mgautierfr committed Jun 12, 2020
1 parent 14af7b7 commit af9afab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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()))
Expand Down

0 comments on commit af9afab

Please sign in to comment.