meson: Allow freetype and cairo subprojects to fail

If their respective option is set to 'auto' configuration of the
fallback subproject should be allowed to fail for any reason.
This commit is contained in:
Xavier Claessens 2020-06-24 15:56:09 -04:00 committed by Ebrahim Byagowi
parent 00c652adab
commit 01fa55e88f
1 changed files with 4 additions and 2 deletions

View File

@ -78,7 +78,8 @@ if not get_option('freetype').disabled()
if not freetype_dep.found()
freetype_dep = dependency('freetype2', fallback: ['freetype2', 'freetype_dep'],
default_options: ['harfbuzz=disabled'])
default_options: ['harfbuzz=disabled'],
required: get_option('freetype'))
endif
else
freetype_dep = dependency('', required: false)
@ -134,7 +135,8 @@ if not get_option('cairo').disabled()
# dependency cycle here because we have configured freetype2 above with
# harfbuzz support disabled, so when cairo will lookup freetype2 dependency
# it will be forced to use that one.
cairo_dep = dependency('cairo', fallback: ['cairo', 'libcairo_dep'])
cairo_dep = dependency('cairo', fallback: ['cairo', 'libcairo_dep'],
required: get_option('cairo'))
endif
# Ensure that cairo-ft is fetched from the same library as cairo itself