Skip to content

Commit

Permalink
Put back the zlib prefix logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
starseeker committed Mar 6, 2024
1 parent 77839da commit 3cab8dc
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions zlib/zlib.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt
--- zlib/CMakeLists.txt 2024-03-06 17:27:21.587097505 -0500
+++ ZLIB_BLD/CMakeLists.txt 2024-03-06 17:27:09.643291842 -0500
--- zlib/CMakeLists.txt 2024-03-06 18:22:33.423844858 -0500
+++ ZLIB_BLD/CMakeLists.txt 2024-03-06 18:21:58.292423507 -0500
@@ -3,6 +3,13 @@

project(zlib C)
Expand All @@ -15,9 +15,20 @@ diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt
set(VERSION "1.3.1")

option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" ON)
@@ -59,39 +66,23 @@
@@ -58,40 +65,34 @@
#
check_include_file(unistd.h Z_HAVE_UNISTD_H)

+option(ENABLE_Z_PREFIX "Add z_ prefix to all library functions." OFF)
+if (DEFINED Z_PREFIX_STR)
+ set (ENABLE_Z_PREFIX ON CACHE BOOL "Ensure prefix is set" FORCE)
+endif (DEFINED Z_PREFIX_STR)
+if (ENABLE_Z_PREFIX)
+ set(Z_PREFIX 1)
+endif (ENABLE_Z_PREFIX)
+mark_as_advanced (ENABLE_Z_PREFIX)
+mark_as_advanced (Z_PREFIX_STR)
+
if(MSVC)
- set(CMAKE_DEBUG_POSTFIX "d")
+ #set(CMAKE_DEBUG_POSTFIX "d")
Expand Down Expand Up @@ -61,7 +72,7 @@ diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt
)
set(ZLIB_PRIVATE_HDRS
crc32.h
@@ -122,14 +113,8 @@
@@ -122,14 +123,8 @@
zutil.c
)

Expand All @@ -77,7 +88,7 @@ diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})

@@ -147,16 +132,35 @@
@@ -147,16 +142,35 @@
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
Expand Down Expand Up @@ -114,7 +125,7 @@ diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt
# This property causes shared libraries on Linux to have the full version
# encoded into their final filename. We disable this on Cygwin because
# it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll
@@ -165,18 +169,12 @@
@@ -165,18 +179,12 @@
# This has no effect with MSVC, on that platform the version info for
# the DLL comes from the resource file win32/zlib1.rc
set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION})
Expand All @@ -137,7 +148,7 @@ diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt

if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
install(TARGETS zlib zlibstatic
@@ -187,12 +185,7 @@
@@ -187,12 +195,7 @@
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION "${INSTALL_INC_DIR}")
endif()
Expand Down

0 comments on commit 3cab8dc

Please sign in to comment.