Merge pull request #4084 from harfbuzz/cairo-check-funcs

[meson] Enable all checked for Cairo functions for internal Cairo
This commit is contained in:
Matthias Clasen 2023-01-26 23:17:11 -05:00 committed by GitHub
commit c03c8548f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 5 deletions

View File

@ -205,13 +205,19 @@ endif
if cairo_dep.found() if cairo_dep.found()
conf.set('HAVE_CAIRO', 1) 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' if cairo_dep.type_name() == 'internal'
conf.set('HAVE_CAIRO_USER_FONT_FACE_SET_RENDER_COLOR_GLYPH_FUNC', 1) foreach func: check_cairo_funcs
conf.set('HAVE_CAIRO_FONT_OPTIONS_GET_CUSTOM_PALETTE_COLOR', 1) name = func[0]
conf.set('HAVE_@0@'.format(name.to_upper()), 1)
endforeach
else else
check_funcs += [['cairo_user_font_face_set_render_color_glyph_func', {'deps': cairo_dep}]] check_funcs += check_cairo_funcs
check_funcs += [['cairo_font_options_get_custom_palette_color', {'deps': cairo_dep}]]
check_funcs += [['cairo_user_scaled_font_get_foreground_source', {'deps': cairo_dep}]]
endif endif
endif endif