Skip to content

Commit

Permalink
libmatroska2: use the library/include found for zlib
Browse files Browse the repository at this point in the history
Fixes #156
  • Loading branch information
robUx4 committed Dec 27, 2024
1 parent 9ef20b7 commit a49e5c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion libmatroska2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ target_include_directories("matroska2" PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_

if (CONFIG_ZLIB)
if(ZLIB_FOUND)
target_link_libraries("matroska2" PRIVATE $<BUILD_INTERFACE:z>)
target_include_directories("matroska2" PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries("matroska2" PRIVATE ${ZLIB_LIBRARIES})
else()
target_link_libraries("matroska2" PRIVATE $<BUILD_INTERFACE:zlib>)
endif()
Expand Down
6 changes: 2 additions & 4 deletions libmatroska2/matroskamain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <zlib.h>
#endif
#if defined(CONFIG_BZLIB)
#include <bzlib.h>
Expand Down

0 comments on commit a49e5c2

Please sign in to comment.