From 01fa55e88fc03374214a961b9ced089d6812358f Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 24 Jun 2020 15:56:09 -0400 Subject: [PATCH] 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. --- meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index d159058b1..3015ca70d 100644 --- a/meson.build +++ b/meson.build @@ -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