Skip to content

Commit

Permalink
CMake: use the system bzip2 if it exists
Browse files Browse the repository at this point in the history
It's found on macOS and sometimes Linux.
  • Loading branch information
robUx4 committed Jan 1, 2025
1 parent d7731d4 commit 0a7c871
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions libmatroska2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,23 @@ if (CONFIG_ZLIB)
target_link_libraries("matroska2" PRIVATE $<BUILD_INTERFACE:zlibstatic>)
endif()
endif(CONFIG_ZLIB)

if (CONFIG_LZO1X)
add_subdirectory("minilzo")
target_link_libraries("matroska2" PRIVATE $<BUILD_INTERFACE:minilzo>)
endif(CONFIG_LZO1X)

if (CONFIG_BZLIB)
add_subdirectory("bzip2")
target_link_libraries("matroska2" PRIVATE $<BUILD_INTERFACE:bzlib>)
find_package (BZip2)
if(BZIP2_FOUND)
target_include_directories("matroska2" PRIVATE ${BZIP2_INCLUDE_DIRS})
target_link_libraries("matroska2" PRIVATE ${BZIP2_LIBRARIES})
else()
add_subdirectory("bzip2")
target_link_libraries("matroska2" PRIVATE $<BUILD_INTERFACE:bzlib>)
endif()
endif(CONFIG_BZLIB)

if (NOT CONFIG_NOCODEC_HELPER)
add_subdirectory("tremor")
target_link_libraries("matroska2" PRIVATE $<BUILD_INTERFACE:tremor>)
Expand Down

0 comments on commit 0a7c871

Please sign in to comment.