From fbe776aaaa38ed3424ff31a65f44ada9f4075795 Mon Sep 17 00:00:00 2001 From: Maciej Lisiewski Date: Wed, 31 May 2023 18:28:17 -0400 Subject: [PATCH] Fix OpenEXR build with GCC13 --- deps/OpenEXR/0001-OpenEXR-GCC13.patch | 31 +++++++++++++++++++++++++++ deps/OpenEXR/OpenEXR.cmake | 5 +++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 deps/OpenEXR/0001-OpenEXR-GCC13.patch diff --git a/deps/OpenEXR/0001-OpenEXR-GCC13.patch b/deps/OpenEXR/0001-OpenEXR-GCC13.patch new file mode 100644 index 0000000000..bf7d6ae82b --- /dev/null +++ b/deps/OpenEXR/0001-OpenEXR-GCC13.patch @@ -0,0 +1,31 @@ +--- a/OpenEXR/IlmImf/ImfDwaCompressor.cpp ++++ b/OpenEXR/IlmImf/ImfDwaCompressor.cpp +@@ -159,6 +159,7 @@ + #include + + #include ++#include + + + // Windows specific addition to prevent the indirect import of the redefined min/max macros +--- a/OpenEXR/IlmImf/ImfHuf.h ++++ b/OpenEXR/IlmImf/ImfHuf.h +@@ -40,6 +40,8 @@ + #include "ImfExport.h" + #include "ImfNamespace.h" + ++#include ++ + //----------------------------------------------------------------------------- + // + // 16-bit Huffman compression and decompression: +--- a/OpenEXR/IlmImf/ImfMisc.h ++++ b/OpenEXR/IlmImf/ImfMisc.h +@@ -51,6 +51,7 @@ + #include "ImfForward.h" + + #include ++#include + #include + + diff --git a/deps/OpenEXR/OpenEXR.cmake b/deps/OpenEXR/OpenEXR.cmake index 3be96898da..12272cbd09 100644 --- a/deps/OpenEXR/OpenEXR.cmake +++ b/deps/OpenEXR/OpenEXR.cmake @@ -2,12 +2,13 @@ bambustudio_add_cmake_project(OpenEXR # GIT_REPOSITORY https://github.com/openexr/openexr.git URL https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip URL_HASH SHA256=0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de + PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-OpenEXR-GCC13.patch DEPENDS ${ZLIB_PKG} GIT_TAG v2.5.5 CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON - -DBUILD_TESTING=OFF - -DPYILMBASE_ENABLE:BOOL=OFF + -DBUILD_TESTING=OFF + -DPYILMBASE_ENABLE:BOOL=OFF -DOPENEXR_VIEWERS_ENABLE:BOOL=OFF -DOPENEXR_BUILD_UTILS:BOOL=OFF )