[cairo-commit] 2 commits - meson.build
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 3 21:27:49 UTC 2023
meson.build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 718e577adf07fb29153ba6c3e6519c9c4b254e75
Merge: e7aa3a4c0 5ef0375a7
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Mon Jul 3 21:27:48 2023 +0000
Merge branch 'fix-no-png-build' into 'master'
Disable svg glyph renderer when PNG is disabled
Closes #784
See merge request cairo/cairo!489
commit 5ef0375a7de3fd87bc1d9b8df33b4ddd491f3e1b
Author: Uli Schlachter <psychon at znc.in>
Date: Mon Jul 3 18:06:17 2023 +0200
Disable svg glyph renderer when PNG is disabled
When trying to build with -Dpng=disabled with a new enough FreeType
version, the build would fail in cairo-svg-glyph-renderer.c:
src/cairo-svg-glyph-render.c:1841:15: error: implicit declaration of
function ‘cairo_image_surface_create_from_png_stream’; did you mean
‘cairo_image_surface_create_for_data’?
[-Werror=implicit-function-declaration]
Fix this by disabling HAVE_FT_SVG_DOCUMENT when png is not enabled.
Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/784
Signed-off-by: Uli Schlachter <psychon at znc.in>
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 <freetype/otsvg.h>')
+ if png_dep.found() and \
+ cc.has_type('FT_SVG_Document', dependencies: freetype_dep, prefix: '#include <freetype/otsvg.h>')
conf.set('HAVE_FT_SVG_DOCUMENT', 1)
if ttx.found()
conf.set('CAIRO_CAN_TEST_TTX_FONT', 1)
More information about the cairo-commit
mailing list