meson.build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) New commits: commit 1bc38359d1b250e56c3a759817c16157a4cd7722 Author: Jeremy Huddleston Sequoia <jeremyhu@xxxxxxxxx> Date: Mon Jun 20 00:39:25 2022 -0700 meson: Fix linking libexpat on darwin Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@xxxxxxxxx> diff --git a/meson.build b/meson.build index f616600..ab0fb13 100644 --- a/meson.build +++ b/meson.build @@ -33,8 +33,14 @@ if not freetype_dep.found() fallback: ['freetype2', 'freetype_dep']) endif -expat_dep = dependency('expat', - fallback: ['expat', 'expat_dep']) +# Linking expat should not be so difficult... see: https://github.com/mesonbuild/meson/issues/10516 +expat_dep = dependency('expat', required: false) +if not expat_dep.found() + expat_dep = cc.find_library('expat', required : false) + if not expat_dep.found() + expat_dep = dependency('expat', method: 'system', fallback: ['expat', 'expat_dep']) + endif +endif i18n = import('i18n') pkgmod = import('pkgconfig')