From 7a714d1a8d28f626efeb7e1785acda104ffce29f Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 27 Jan 2023 03:12:36 +0200 Subject: [PATCH] [meson] Enable all checked for Cairo functions for internal Cairo Similar to what we do with FreeType ones. --- meson.build | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 9819d80c4..464f28933 100644 --- a/meson.build +++ b/meson.build @@ -205,13 +205,19 @@ endif if cairo_dep.found() conf.set('HAVE_CAIRO', 1) + check_cairo_funcs = [ + ['cairo_user_font_face_set_render_color_glyph_func', {'deps': cairo_dep}], + ['cairo_font_options_get_custom_palette_color', {'deps': cairo_dep}], + ['cairo_user_scaled_font_get_foreground_source', {'deps': cairo_dep}], + ] + if cairo_dep.type_name() == 'internal' - conf.set('HAVE_CAIRO_USER_FONT_FACE_SET_RENDER_COLOR_GLYPH_FUNC', 1) - conf.set('HAVE_CAIRO_FONT_OPTIONS_GET_CUSTOM_PALETTE_COLOR', 1) + foreach func: check_cairo_funcs + name = func[0] + conf.set('HAVE_@0@'.format(name.to_upper()), 1) + endforeach else - check_funcs += [['cairo_user_font_face_set_render_color_glyph_func', {'deps': cairo_dep}]] - check_funcs += [['cairo_font_options_get_custom_palette_color', {'deps': cairo_dep}]] - check_funcs += [['cairo_user_scaled_font_get_foreground_source', {'deps': cairo_dep}]] + check_funcs += check_cairo_funcs endif endif