[meson] try freetype without harfbuzz just as a last resort

This commit is contained in:
Ebrahim Byagowi 2020-07-01 14:22:46 +04:30
parent 01fa55e88f
commit 020b182c79
1 changed files with 11 additions and 4 deletions

View File

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