From: Marco Felsch Date: Wed, 13 Mar 2019 11:03:18 +0100 Subject: [PATCH] tests: fix build dependency In case of cairo is found but without png support this test will fail during linking becuase the 'cairo_surface_write_to_png' is undefined. Signed-off-by: Marco Felsch --- tests/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index bceb9093d9a5..6a74e0998a08 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -35,12 +35,17 @@ if cairo_dep.found() test_cflags += '-DHAVE_CAIRO' tests += [ [ 'testiter', [ 'testiter.c' ], [ libpangocairo_dep ] ], - [ 'test-pangocairo-threads', [ 'test-pangocairo-threads.c' ], [ libpangocairo_dep, cairo_dep ] ], [ 'markup-parse', [ 'markup-parse.c' ], [ libpangocairo_dep ] ], [ 'test-layout', [ 'test-layout.c', 'test-common.c' ], [ libpangocairo_dep ] ], [ 'test-font', [ 'test-font.c' ], [ libpangocairo_dep ] ], [ 'testattributes', [ 'testattributes.c', 'test-common.c' ], [ libpangocairo_dep ] ], ] + + if pango_cairo_backends.contains('png') + tests += [ + [ 'test-pangocairo-threads', [ 'test-pangocairo-threads.c' ], [ libpangocairo_dep, cairo_dep ] ], + ] + endif endif installed_test_data = [