Skip to content

Commit

Permalink
Fix OpenEXR build with GCC13
Browse files Browse the repository at this point in the history
  • Loading branch information
c2h5oh authored and lanewei120 committed Jun 14, 2023
1 parent 58e9996 commit fbe776a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
31 changes: 31 additions & 0 deletions deps/OpenEXR/0001-OpenEXR-GCC13.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--- a/OpenEXR/IlmImf/ImfDwaCompressor.cpp
+++ b/OpenEXR/IlmImf/ImfDwaCompressor.cpp
@@ -159,6 +159,7 @@
#include <limits>

#include <cstddef>
+#include <cstdint>


// 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 <cstdint>
+
//-----------------------------------------------------------------------------
//
// 16-bit Huffman compression and decompression:
--- a/OpenEXR/IlmImf/ImfMisc.h
+++ b/OpenEXR/IlmImf/ImfMisc.h
@@ -51,6 +51,7 @@
#include "ImfForward.h"

#include <cstddef>
+#include <cstdint>
#include <vector>


5 changes: 3 additions & 2 deletions deps/OpenEXR/OpenEXR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit fbe776a

Please sign in to comment.