From ca18c5b1b5004ffa88b6b3b85cd038d1217c09c6 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 2 Mar 2024 22:57:02 +0100 Subject: 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. --- contrib/zlib/local.patch | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 contrib/zlib/local.patch (limited to 'contrib/zlib/local.patch') 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() -- cgit v1.1