From a49e5c2d04ce8bdcb8d8b9f7db55bbb9658ad826 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Fri, 27 Dec 2024 09:26:05 +0100 Subject: [PATCH] libmatroska2: use the library/include found for zlib Fixes #156 --- libmatroska2/CMakeLists.txt | 3 ++- libmatroska2/matroskamain.c | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libmatroska2/CMakeLists.txt b/libmatroska2/CMakeLists.txt index 0b0c88a7..bf192714 100644 --- a/libmatroska2/CMakeLists.txt +++ b/libmatroska2/CMakeLists.txt @@ -52,7 +52,8 @@ target_include_directories("matroska2" PUBLIC $) + target_include_directories("matroska2" PRIVATE ${ZLIB_INCLUDE_DIRS}) + target_link_libraries("matroska2" PRIVATE ${ZLIB_LIBRARIES}) else() target_link_libraries("matroska2" PRIVATE $) endif() diff --git a/libmatroska2/matroskamain.c b/libmatroska2/matroskamain.c index 25e911d4..4b78635a 100644 --- a/libmatroska2/matroskamain.c +++ b/libmatroska2/matroskamain.c @@ -28,10 +28,8 @@ #include "matroska2/matroska.h" #include "matroska2/matroska_sem.h" #include "matroska2/matroska_classes.h" -#if defined(HAVE_ZLIB) -#include "zlib/zlib.h" -#elif defined(CONFIG_ZLIB) -#include "zlib.h" +#if defined(CONFIG_ZLIB) +#include #endif #if defined(CONFIG_BZLIB) #include