diff --git a/meson.build b/meson.build index c5a65cd33..c4fcd675b 100644 --- a/meson.build +++ b/meson.build @@ -336,7 +336,8 @@ if freetype_dep.found() if not cc.links(files('meson-cc-tests/ft_has_color.c'), dependencies: freetype_dep, name: 'FT has color') conf.set('FT_HAS_COLOR', '(0)') endif - if cc.has_type('FT_SVG_Document', dependencies: freetype_dep, prefix: '#include ') + if png_dep.found() and \ + cc.has_type('FT_SVG_Document', dependencies: freetype_dep, prefix: '#include ') conf.set('HAVE_FT_SVG_DOCUMENT', 1) if ttx.found() conf.set('CAIRO_CAN_TEST_TTX_FONT', 1)