parent
cafd235206
commit
c93f1b4cf8
@ -1 +1,2 @@
|
||||
/minizip-2.5.0.tar.gz
|
||||
/minizip-2.5.4.tar.gz
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 01bc6016fb86e6aa5b714752b7e18d6a3c96eca4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= <panovotn@redhat.com>
|
||||
Date: Fri, 17 Aug 2018 10:38:13 +0200
|
||||
Subject: [PATCH] use system Bzip2 library if available
|
||||
|
||||
---
|
||||
CMakeLists.txt | 22 +++++++++++++++++++++-
|
||||
1 file changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 11f35dd..c6606b6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -45,6 +45,16 @@ if(USE_ZLIB)
|
||||
add_definitions(-DHAVE_ZLIB)
|
||||
endif()
|
||||
|
||||
+# Check if bzip2 installation is present
|
||||
+if(USE_BZIP2)
|
||||
+ set(BZIP2_ROOT ${DEF_BZIP2_ROOT} CACHE PATH "Parent directory of bzip2 installation")
|
||||
+ find_package(BZip2)
|
||||
+ if(BZIP2_FOUND)
|
||||
+ include_directories(${BZIP2_INCLUDE_DIRS})
|
||||
+ endif()
|
||||
+ add_definitions(-DHAVE_BZIP2)
|
||||
+endif()
|
||||
+
|
||||
set(MINIZIP_PC ${CMAKE_CURRENT_BINARY_DIR}/minizip.pc)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/minizip.pc.cmakein ${MINIZIP_PC} @ONLY)
|
||||
|
||||
@@ -202,7 +212,14 @@ if(USE_ZLIB)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-if(USE_BZIP2)
|
||||
+if(USE_BZIP2 AND BZIP2_FOUND)
|
||||
+ add_definitions(-DHAVE_BZIP2)
|
||||
+
|
||||
+ list(APPEND MINIZIP_SRC "mz_strm_bzip.c")
|
||||
+ list(APPEND MINIZIP_PUBLIC_HEADERS "mz_strm_bzip.h")
|
||||
+
|
||||
+ set(CMAKE_REQUIRED_LIBRARIES BZip2::BZip2)
|
||||
+elseif(USE_BZIP2)
|
||||
add_definitions(-DHAVE_BZIP2)
|
||||
add_definitions(-DBZ_NO_STDIO)
|
||||
|
||||
@@ -370,6 +387,9 @@ set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE C PREFIX ""
|
||||
if(USE_ZLIB)
|
||||
target_link_libraries(${PROJECT_NAME} ZLIB::ZLIB)
|
||||
endif()
|
||||
+if(USE_BZIP2 AND BZIP2_FOUND)
|
||||
+ target_link_libraries(${PROJECT_NAME} BZip2::BZip2)
|
||||
+endif()
|
||||
if(USE_LZMA)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES C_STANDARD 99)
|
||||
endif()
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1 +1 @@
|
||||
SHA512 (minizip-2.5.0.tar.gz) = 321d88754159c982650966b14be8e9d47eb64fc692ea699f5890fe5bf27576899aaa7f750cce77d59cd17b5bd365cdf75dc43f21c11b9330568a806f898171c6
|
||||
SHA512 (minizip-2.5.4.tar.gz) = 5125ed603ae550b375e9af0d9c885144e1a02dfbf33582dbb158b34643d633f3f2cda1f8359b79864d9ec5ee933435279d326d16ccfa193937281ccf4d6a192c
|
||||
|
Loading…
Reference in new issue