diff --git a/meson.build b/meson.build index 3015ca70d..40a77f277 100644 --- a/meson.build +++ b/meson.build @@ -73,13 +73,20 @@ if not get_option('freetype').disabled() if not freetype_dep.found() and cpp.get_id() == 'msvc' freetype_dep = cpp.find_library('freetype', required: false, - has_headers: ['ft2build.h'], ) + has_headers: ['ft2build.h']) endif if not freetype_dep.found() - freetype_dep = dependency('freetype2', fallback: ['freetype2', 'freetype_dep'], - default_options: ['harfbuzz=disabled'], - required: get_option('freetype')) + freetype_dep = dependency('freetype2', required: false, + fallback: ['freetype2', 'freetype_dep']) + endif + + if not freetype_dep.found() + # try to fetch freetype2 without harfbuzz, just as a last resort + # https://github.com/harfbuzz/harfbuzz/pull/2498 + freetype_dep = dependency('freetype2', required: get_option('freetype'), + fallback: ['freetype2', 'freetype_dep'], + default_options: ['harfbuzz=disabled']) endif else freetype_dep = dependency('', required: false)