summaryrefslogtreecommitdiffhomepage
path: root/contrib/zlib/local.patch
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-03-02 22:57:02 +0100
committerAki <please@ignore.pl>2024-03-03 00:59:45 +0100
commitca18c5b1b5004ffa88b6b3b85cd038d1217c09c6 (patch)
tree1ba5a8734c96f892322cd65af7cf33041ba4cb68 /contrib/zlib/local.patch
parente70158ea57302e2fa2d588b67fc8dc18265192eb (diff)
downloadstarshatter-ca18c5b1b5004ffa88b6b3b85cd038d1217c09c6.zip
starshatter-ca18c5b1b5004ffa88b6b3b85cd038d1217c09c6.tar.gz
starshatter-ca18c5b1b5004ffa88b6b3b85cd038d1217c09c6.tar.bz2
zlib sources removed from this tree
This, for whatever reason, breaks std::fs exception handling. All remaining external projects will be moved to use this approach soon. This is to prepare it for more new libraries which would otherwise make the tree grow even further.
Diffstat (limited to 'contrib/zlib/local.patch')
-rw-r--r--contrib/zlib/local.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/contrib/zlib/local.patch b/contrib/zlib/local.patch
new file mode 100644
index 0000000..c796577
--- /dev/null
+++ b/contrib/zlib/local.patch
@@ -0,0 +1,58 @@
+diff '--color=auto' -aru a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2024-03-02 21:53:46.618195390 +0100
++++ b/CMakeLists.txt 2024-03-02 22:02:48.088217647 +0100
+@@ -63,7 +63,6 @@
+ set(CMAKE_DEBUG_POSTFIX "d")
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
+ add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
+- include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+ endif()
+
+ if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
+@@ -83,7 +82,6 @@
+ ${ZLIB_PC} @ONLY)
+ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
+ ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
+-include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
+
+
+ #============================================================================
+@@ -185,8 +183,12 @@
+
+ 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})
++target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
++target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
+ set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
+ set_target_properties(zlib PROPERTIES SOVERSION 1)
++add_library(Zlib::zlib ALIAS zlib)
++add_library(Zlib::zlibstatic ALIAS zlibstatic)
+
+ if(NOT CYGWIN)
+ # This property causes shared libraries on Linux to have the full version
+@@ -225,25 +227,3 @@
+ if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
+ install(FILES ${ZLIB_PC} DESTINATION "${INSTALL_PKGCONFIG_DIR}")
+ endif()
+-
+-#============================================================================
+-# Example binaries
+-#============================================================================
+-
+-add_executable(example test/example.c)
+-target_link_libraries(example zlib)
+-add_test(example example)
+-
+-add_executable(minigzip test/minigzip.c)
+-target_link_libraries(minigzip zlib)
+-
+-if(HAVE_OFF64_T)
+- add_executable(example64 test/example.c)
+- target_link_libraries(example64 zlib)
+- set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
+- add_test(example64 example64)
+-
+- add_executable(minigzip64 test/minigzip.c)
+- target_link_libraries(minigzip64 zlib)
+- set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
+-endif()