Skip to content

Commit

Permalink
Externals: Add a stripped down version of minizip.
Browse files Browse the repository at this point in the history
  • Loading branch information
delroth authored and Zexaron committed Oct 9, 2018
1 parent 4809726 commit 8e26d33
Show file tree
Hide file tree
Showing 11 changed files with 2,904 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ else()
add_subdirectory(Externals/zlib)
endif()

add_subdirectory(Externals/minizip)
include_directories(External/minizip)

if(NOT APPLE)
check_lib(LZO "(no .pc for lzo2)" lzo2 lzo/lzo1x.h QUIET)
endif()
Expand Down
16 changes: 16 additions & 0 deletions Externals/minizip/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
project(minizip C)

set(SRCS ioapi.c unzip.c)

add_definitions(-DNOUNCRYPT)
if(UNIX)
add_definitions(-D__USE_FILE_OFFSET64)
add_definitions(-D__USE_LARGEFILE64)
add_definitions(-D_LARGEFILE64_SOURCE)
add_definitions(-D_FILE_OFFSET_BIT=64)
endif()

add_library(minizip STATIC ${SRCS})
target_include_directories(minizip PUBLIC .)

add_library(MiniZip::minizip ALIAS minizip)
17 changes: 17 additions & 0 deletions Externals/minizip/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Condition of use and distribution are the same as zlib:

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgement in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
2 changes: 2 additions & 0 deletions Externals/minizip/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Partial import from https://github.com/nmoinvaz/minizip
Revision: b3713abe7722f1b779e7cdbd527c6208abbe1121
Loading

0 comments on commit 8e26d33

Please sign in to comment.