Permalink
Browse files

Added miniz as a submodule for unzipping attached file from settings

  • Loading branch information...
1 parent 067420a commit 79c9354d6701c6837632a393f4c3a51be850a625 @mickem committed Nov 27, 2016
Showing with 36 additions and 0 deletions.
  1. +3 −0 .gitmodules
  2. +19 −0 build/cmake/FindMiniz.cmake
  3. +6 −0 build/cmake/dependencies.cmake
  4. +1 −0 ext/miniz
  5. +7 −0 libs/settings_manager/CMakeLists.txt
View
@@ -25,3 +25,6 @@
[submodule "ext/google-breakpad"]
path = ext/google-breakpad
url = https://github.com/mickem/google-breakpad.git
+[submodule "ext/miniz"]
+ path = ext/miniz
+ url = https://github.com/paulharris/miniz.git
@@ -0,0 +1,19 @@
+# - Find miniz zip library
+#
+# MINIZ_FOUND - have cpp-netlib been found
+# MINIZ_INCLUDE_DIR - path to where miniz is found
+FIND_PATH(MINIZ_INCLUDE_DIR
+ NAMES miniz.c
+ PATHS
+ ${CMAKE_SOURCE_DIR}/ext/miniz
+ ${MINIZ_INCLUDE_DIR}
+ ${NSCP_INCLUDEDIR}
+)
+IF(MINIZ_INCLUDE_DIR)
+ SET(MINIZ_FOUND TRUE)
+ELSE(MINIZ_INCLUDE_DIR)
+ SET(MINIZ_FOUND FALSE)
+ENDIF(MINIZ_INCLUDE_DIR)
+MARK_AS_ADVANCED(
+ MINIZ_INCLUDE_DIR
+)
@@ -19,6 +19,7 @@ FIND_PACKAGE(GoogleProtoBuf)
FIND_PACKAGE(GoogleTest)
FIND_PACKAGE(GoogleBreakpad)
FIND_PACKAGE(OpenSSL)
+FIND_PACKAGE(Miniz)
IF(WIN32)
SET(Boost_USE_STATIC_LIBS_OLD ${Boost_USE_STATIC_LIBS})
SET(Boost_USE_STATIC_RUNTIME_OLD ${Boost_USE_STATIC_RUNTIME})
@@ -142,6 +143,11 @@ IF(CSHARP_FOUND)
ELSE(CSHARP_FOUND)
MESSAGE(STATUS " ! CSharp not found")
ENDIF(CSHARP_FOUND)
+IF(MINIZ_FOUND)
+ MESSAGE(STATUS " - Miniz found in: ${MINIZ_INCLUDE_DIR}")
+ELSE(MINIZ_FOUND)
+ MESSAGE(STATUS " ! Miniz not found: MINIZ_INCLUDE_DIR=${MINIZ_INCLUDE_DIR}")
+ENDIF(MINIZ_FOUND)
IF(WIN32)
Submodule miniz added at b491f8
@@ -48,6 +48,13 @@ IF(OPENSSL_FOUND)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
ENDIF(OPENSSL_FOUND)
+IF(MINIZ_FOUND)
+ INCLUDE_DIRECTORIES(${MINIZ_INCLUDE_DIR})
+ SET(service_SRCS ${service_SRCS}
+ ${MINIZ_INCLUDE_DIR}/miniz.c
+ )
+ ADD_DEFINITIONS(-DHAVE_MINIZ)
+ENDIF(MINIZ_FOUND)
IF(CRYPTOPP_FOUND)
ADD_DEFINITIONS(-DHAVE_LIBCRYPTOPP)

0 comments on commit 79c9354

Please sign in to comment.