From a231dfd8e4b31cfbe697279e2a28e7d019a6d50c Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 15 Dec 2020 19:03:49 +0100 Subject: [PATCH] Build kiwix-lib only if meson is compiled with xapian. --- meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 76165a369..607b2b377 100644 --- a/meson.build +++ b/meson.build @@ -25,7 +25,6 @@ endif thread_dep = dependency('threads') libicu_dep = dependency('icu-i18n', static:static_deps) -libzim_dep = dependency('libzim', version : '>=6.3.0', static:static_deps) pugixml_dep = dependency('pugixml', static:static_deps) libcurl_dep = dependency('libcurl', static:static_deps) microhttpd_dep = dependency('libmicrohttpd', static:static_deps) @@ -39,6 +38,12 @@ else error('Cannot found header mustache.hpp') endif +libzim_dep = dependency('libzim', version : '>=6.3.0', static:static_deps) +if not compiler.has_header_symbol('zim/zim.h', 'LIBZIM_WITH_XAPIAN') + error('Libzim seems to be compiled without xapian. Xapian support is mandatory.') +endif + + extra_cflags = '' if target_machine.system() == 'windows' and static_deps add_project_arguments('-DCURL_STATICLIB', language : 'cpp')