meson: Fix linking libexpat on darwin

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston Sequoia 2022-06-20 00:39:25 -07:00
parent d863f67789
commit 1bc38359d1
1 changed files with 8 additions and 2 deletions

View File

@ -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')