[pango: 1/2] tests: fix build dependency



commit 734ac9ec5180ddf5636fccf702ca7b3482f45ec9
Author: Marco Felsch <m felsch pengutronix de>
Date:   Wed Mar 13 11:03:18 2019 +0100

    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 <m felsch pengutronix de>

 tests/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/tests/meson.build b/tests/meson.build
index bceb9093..6a74e099 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 = [


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]