meson.build: Fix detection of libzim built with Xapian

The dependency on libzim must be specified in compiler.has_header_symbol() for
it to find the header in all cases.

Fixes a configure error on FreeBSD:
"""
Header "zim/zim.h" has symbol "LIBZIM_WITH_XAPIAN" : NO

meson.build:33:2: ERROR: Problem encountered: Libzim seems to be compiled without xapian. Xapian support is mandatory.
"""
This commit is contained in:
Olivier Certner 2023-05-26 10:20:44 +02:00 committed by Kelson
parent b45cfd767a
commit 0ed805ae6b
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ else
endif endif
libzim_dep = dependency('libzim', version : '>=8.1.0', static:static_deps) libzim_dep = dependency('libzim', version : '>=8.1.0', static:static_deps)
if not compiler.has_header_symbol('zim/zim.h', 'LIBZIM_WITH_XAPIAN') if not compiler.has_header_symbol('zim/zim.h', 'LIBZIM_WITH_XAPIAN', dependencies: libzim_dep)
error('Libzim seems to be compiled without xapian. Xapian support is mandatory.') error('Libzim seems to be compiled without xapian. Xapian support is mandatory.')
endif endif