# Brotli 1.1.0 doesn't have explicit support for iOS as a CMAKE_SYSTEM_NAME. # That release was from 2023; there have been subsequent changes that allow # Brotli to build on iOS without any patches, as long as -DBROTLI_BUILD_TOOLS=NO # is specified on the command line. # diff -ru brotli-1.1.0-orig/CMakeLists.txt brotli-1.1.0/CMakeLists.txt --- brotli-1.1.0-orig/CMakeLists.txt 2023-08-29 19:00:29 +++ brotli-1.1.0/CMakeLists.txt 2024-11-07 10:46:26 @@ -114,6 +114,8 @@ add_definitions(-DOS_MACOSX) set(CMAKE_MACOS_RPATH TRUE) set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib") +elseif(${CMAKE_SYSTEM_NAME} MATCHES "iOS") + add_definitions(-DOS_IOS) endif() if(BROTLI_EMSCRIPTEN) @@ -174,10 +176,12 @@ # Installation if(NOT BROTLI_BUNDLED_MODE) - install( - TARGETS brotli - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - ) + if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "iOS") + install( + TARGETS brotli + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + ) + endif() install( TARGETS ${BROTLI_LIBRARIES_CORE} diff -ru brotli-1.1.0-orig/c/common/platform.h brotli-1.1.0/c/common/platform.h --- brotli-1.1.0-orig/c/common/platform.h 2023-08-29 19:00:29 +++ brotli-1.1.0/c/common/platform.h 2024-11-07 10:47:28 @@ -33,7 +33,7 @@ #include #elif defined(OS_FREEBSD) #include -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_IOS) #include /* Let's try and follow the Linux convention */ #define BROTLI_X_BYTE_ORDER BYTE_ORDER