Build kiwix-lib only if meson is compiled with xapian.

This commit is contained in:
Matthieu Gautier 2020-12-15 19:03:49 +01:00 committed by Emmanuel Engelhart
parent 321d08e3d5
commit a231dfd8e4
1 changed files with 6 additions and 1 deletions

View File

@ -25,7 +25,6 @@ endif
thread_dep = dependency('threads') thread_dep = dependency('threads')
libicu_dep = dependency('icu-i18n', static:static_deps) 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) pugixml_dep = dependency('pugixml', static:static_deps)
libcurl_dep = dependency('libcurl', static:static_deps) libcurl_dep = dependency('libcurl', static:static_deps)
microhttpd_dep = dependency('libmicrohttpd', static:static_deps) microhttpd_dep = dependency('libmicrohttpd', static:static_deps)
@ -39,6 +38,12 @@ else
error('Cannot found header mustache.hpp') error('Cannot found header mustache.hpp')
endif 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 = '' extra_cflags = ''
if target_machine.system() == 'windows' and static_deps if target_machine.system() == 'windows' and static_deps
add_project_arguments('-DCURL_STATICLIB', language : 'cpp') add_project_arguments('-DCURL_STATICLIB', language : 'cpp')