changeset 6424:4e7b2af98475

fix zlib build on MacOS 15
author Alain Mazy <am@orthanc.team>
date Tue, 18 Nov 2025 10:18:46 +0100
parents 9612aa45134f
children 211e16909f36
files OrthancFramework/Resources/CMake/ZlibConfiguration.cmake OrthancFramework/Resources/Patches/zlib-1.3.1-zconf.patch
diffstat 2 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/ZlibConfiguration.cmake	Mon Nov 17 12:08:30 2025 +0100
+++ b/OrthancFramework/Resources/CMake/ZlibConfiguration.cmake	Tue Nov 18 10:18:46 2025 +0100
@@ -27,6 +27,14 @@
 
   DownloadPackage(${ZLIB_MD5} ${ZLIB_URL} "${ZLIB_SOURCES_DIR}")
 
+  # fix https://github.com/madler/zlib/issues/1044
+  execute_process(
+    COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
+    ${CMAKE_CURRENT_LIST_DIR}/../Patches/zlib-1.3.1-zconf.patch
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+    RESULT_VARIABLE Failure
+    )
+
   include_directories(
     ${ZLIB_SOURCES_DIR}
     )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancFramework/Resources/Patches/zlib-1.3.1-zconf.patch	Tue Nov 18 10:18:46 2025 +0100
@@ -0,0 +1,12 @@
+diff -ruN zlib-1.3.1-orig/zlib.h zlib-1.3.1/zlib.h
+--- zlib-1.3.1-orig/zlib.h	2025-11-18 10:09:54.402921485 +0100
++++ zlib-1.3.1/zlib.h	2025-11-18 10:10:33.743470112 +0100
+@@ -31,7 +31,7 @@
+ #ifndef ZLIB_H
+ #define ZLIB_H
+ 
+-#include "zconf.h"
++#include <zconf.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {