[meson] Assume cairo_ft always available when cairo isn't from pkgconfig

This commit is contained in:
Ebrahim Byagowi 2020-07-01 03:01:25 +04:30
parent aa8bade97e
commit f3f9205fac
1 changed files with 12 additions and 6 deletions

View File

@ -139,12 +139,18 @@ if not get_option('cairo').disabled()
if cairo_dep.type_name() == 'pkgconfig' if cairo_dep.type_name() == 'pkgconfig'
cairo_ft_dep = dependency('cairo-ft', required: get_option('cairo')) cairo_ft_dep = dependency('cairo-ft', required: get_option('cairo'))
else else
if cpp.has_header('cairo-ft.h') and \
cpp.has_function('cairo_ft_font_face_create_for_ft_face', dependencies: cairo_dep)
cairo_ft_dep = cairo_dep cairo_ft_dep = cairo_dep
else # TODO: Apparently the following isn't reliable to detect whether a dependency provides
cairo_ft_dep = dependency('', required: false) # something or not so let's assume it is always enabled as we control
endif # cairo subproject anyway for now. To fix and test run .ci/build-win32.sh and
# make sure hb-view.exe is not missing.
#
# if cpp.has_header('cairo-ft.h') and \
# cpp.has_function('cairo_ft_font_face_create_for_ft_face', dependencies: cairo_dep)
# cairo_ft_dep = cairo_dep
# else
# cairo_ft_dep = dependency('', required: false)
# endif
endif endif
else else
cairo_ft_dep = dependency('', required: false) cairo_ft_dep = dependency('', required: false)