[meson] use dependency's has_headers to make pulled cairo has ft support
This commit is contained in:
parent
020b182c79
commit
aadcd3ed8a
18
meson.build
18
meson.build
|
@ -151,18 +151,12 @@ 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
|
||||||
cairo_ft_dep = cairo_dep
|
cairo_ft_dep = dependency('cairo', fallback: ['cairo', 'libcairo_dep'],
|
||||||
# TODO: Apparently the following isn't reliable to detect whether a dependency provides
|
has_headers: ['cairo-ft.h'],
|
||||||
# something or not so let's assume it is always enabled as we control
|
required: get_option('cairo'))
|
||||||
# cairo subproject anyway for now. To fix and test run .ci/build-win32.sh and
|
if cairo_ft_dep.found()
|
||||||
# make sure hb-view.exe is not missing.
|
cairo_dep = cairo_ft_dep
|
||||||
#
|
endif
|
||||||
# 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)
|
||||||
|
|
Loading…
Reference in New Issue