From 643293c7df608249e4c94b63477d44b447521b2c Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Fri, 7 Apr 2017 11:25:17 +0200 Subject: [PATCH] Try to link with uuid only if xapian is present. --- meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index dc08a9d..19d86c6 100644 --- a/meson.build +++ b/meson.build @@ -19,7 +19,12 @@ if meson.is_cross_build() and host_machine.system() == 'windows' # xapian doesn't use uuid on windows. uuid_dep = declare_dependency() else - uuid_dep = declare_dependency(link_args:['-luuid', '-lrt']) + xapian_dep = dependency('xapian-core', required : false) + if xapian_dep.found() + uuid_dep = declare_dependency(link_args:['-luuid', '-lrt']) + else + uuid_dep = declare_dependency() + endif endif all_deps = [thread_dep, kiwixlib_dep, microhttpd_dep, z_dep, uuid_dep]