From 474d68b9c04e39b2bb07ff0a02ba1041a3370a6d Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Tue, 29 Oct 2024 12:53:05 +0100 Subject: [PATCH] disable test if zlib is not available --- tests/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 890ba84409..587ca61c75 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -71,7 +71,6 @@ endif() if (WITH_UNCOMPRESSED_CODEC) add_libheif_test(uncompressed_decode) - add_libheif_test(uncompressed_decode_generic_compression) add_libheif_test(uncompressed_decode_mono) add_libheif_test(uncompressed_decode_rgb) add_libheif_test(uncompressed_decode_rgb16) @@ -81,6 +80,12 @@ if (WITH_UNCOMPRESSED_CODEC) add_libheif_test(uncompressed_decode_ycbcr420) add_libheif_test(uncompressed_decode_ycbcr422) add_libheif_test(uncompressed_encode) + + if (ZLIB_FOUND) + add_libheif_test(uncompressed_decode_generic_compression) + else() + message(WARNING "Generic compress tests of the 'uncompressed codec' are not compiled because zlib was not found") + endif () else() message(WARNING "Tests of the 'uncompressed codec' are not compiled because the uncompressed codec is not enabled (WITH_UNCOMPRESSED_CODEC==OFF)") endif ()