Skip to content

Commit

Permalink
Bump zlib
Browse files Browse the repository at this point in the history
  • Loading branch information
a1rwulf committed Apr 30, 2020
1 parent a7469e4 commit c421658
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 225 deletions.
36 changes: 36 additions & 0 deletions depends/common/zlib/01-build-static.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -183,10 +183,11 @@
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)

-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
-set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
-set_target_properties(zlib PROPERTIES SOVERSION 1)
+add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+if(BUILD_SHARED_LIBS)
+ set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
+ set_target_properties(zlib PROPERTIES SOVERSION 1)
+endif()

if(NOT CYGWIN)
# This property causes shared libraries on Linux to have the full version
@@ -201,7 +202,7 @@

if(UNIX)
# On unix-like platforms the library is almost always called libz
- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
+ set_target_properties(zlib PROPERTIES OUTPUT_NAME z)
if(NOT APPLE)
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
endif()
@@ -211,7 +212,7 @@
endif()

if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
- install(TARGETS zlib zlibstatic
+ install(TARGETS zlib
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" )
224 changes: 0 additions & 224 deletions depends/common/zlib/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion depends/common/zlib/zlib.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
zlib https://github.com/madler/zlib 30a1c7065dc1dc2c2ed68ed403792b660bfdd805
zlib https://github.com/madler/zlib v1.2.11

0 comments on commit c421658

Please sign in to comment.