PKGBUILDs/community/openvdb/openvdb-openexr3.patch
2021-04-28 14:13:19 +00:00

122 lines
3.8 KiB
Diff

diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake
index 3cb246d6..a9c8c8bb 100644
--- a/cmake/FindOpenVDB.cmake
+++ b/cmake/FindOpenVDB.cmake
@@ -444,7 +444,7 @@ endif()
# Add standard dependencies
-find_package(IlmBase REQUIRED COMPONENTS Half)
+find_package(Imath CONFIG REQUIRED)
find_package(TBB REQUIRED COMPONENTS tbb)
find_package(ZLIB REQUIRED)
@@ -596,8 +596,7 @@ if(OpenVDB_USES_LOG4CPLUS)
endif()
if(OpenVDB_USES_EXR)
- find_package(IlmBase REQUIRED)
- find_package(OpenEXR REQUIRED)
+ find_package(OpenEXR CONFIG REQUIRED)
endif()
if(UNIX)
@@ -608,7 +607,7 @@ if(WIN32)
# @note OPENVDB_OPENEXR_STATICLIB is old functionality from the makefiles
# used in PlatformConfig.h to configure EXR exports. Once this file
# is completely removed, this define can be too
- get_target_property(ILMBASE_LIB_TYPE IlmBase::Half TYPE)
+ get_target_property(ILMBASE_LIB_TYPE Imath::Imath TYPE)
if(OPENEXR_USE_STATIC_LIBS OR (${ILMBASE_LIB_TYPE} STREQUAL STATIC_LIBRARY))
list(APPEND OpenVDB_DEFINITIONS OPENVDB_OPENEXR_STATICLIB)
endif()
@@ -623,7 +622,7 @@ endif()
set(_OPENVDB_VISIBLE_DEPENDENCIES
Boost::iostreams
Boost::system
- IlmBase::Half
+ Imath::Imath
)
if(OpenVDB_ABI)
@@ -632,10 +631,7 @@ endif()
if(OpenVDB_USES_EXR)
list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES
- IlmBase::IlmThread
- IlmBase::Iex
- IlmBase::Imath
- OpenEXR::IlmImf
+ OpenEXR::OpenEXR
)
list(APPEND OpenVDB_DEFINITIONS OPENVDB_TOOLS_RAYTRACER_USE_EXR)
endif()
diff --git a/openvdb/openvdb/CMakeLists.txt b/openvdb/openvdb/CMakeLists.txt
index 04bfee59..c853689a 100644
--- a/openvdb/openvdb/CMakeLists.txt
+++ b/openvdb/openvdb/CMakeLists.txt
@@ -46,8 +46,8 @@ message(STATUS "----------------------------------------------------")
# Collect and configure lib dependencies
if(USE_EXR)
- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED)
- find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED)
+ find_package(Imath CONFIG REQUIRED)
+ find_package(OpenEXR CONFIG REQUIRED)
if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_OPENEXR_VERSION)
if(${OpenEXR_VERSION} VERSION_LESS FUTURE_MINIMUM_OPENEXR_VERSION)
message(DEPRECATION "Support for OpenEXR versions < ${FUTURE_MINIMUM_OPENEXR_VERSION} "
@@ -55,7 +55,7 @@ if(USE_EXR)
endif()
endif()
else()
- find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half)
+ find_package(Imath CONFIG REQUIRED)
endif()
if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_ILMBASE_VERSION)
@@ -129,7 +129,7 @@ endif()
set(OPENVDB_CORE_DEPENDENT_LIBS
Boost::iostreams
Boost::system
- IlmBase::Half
+ Imath::Imath
)
if(WIN32)
@@ -147,10 +147,8 @@ endif()
if(USE_EXR)
list(APPEND OPENVDB_CORE_DEPENDENT_LIBS
- IlmBase::IlmThread
- IlmBase::Iex
- IlmBase::Imath
- OpenEXR::IlmImf
+ Imath::Imath
+ OpenEXR::OpenEXR
)
endif()
@@ -413,7 +411,7 @@ if(WIN32)
# @note OPENVDB_OPENEXR_STATICLIB is old functionality from the makefiles
# used in PlatformConfig.h to configure EXR exports. Once this file
# is completely removed, this define can be too
- get_target_property(ILMBASE_LIB_TYPE IlmBase::Half TYPE)
+ get_target_property(ILMBASE_LIB_TYPE Imath::Imath TYPE)
if(OPENEXR_USE_STATIC_LIBS OR (${ILMBASE_LIB_TYPE} STREQUAL STATIC_LIBRARY))
list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -DOPENVDB_OPENEXR_STATICLIB)
endif()
diff --git a/openvdb/openvdb/Types.h b/openvdb/openvdb/Types.h
index d176c874..4ba72e3e 100644
--- a/openvdb/openvdb/Types.h
+++ b/openvdb/openvdb/Types.h
@@ -7,7 +7,7 @@
#include "version.h"
#include "Platform.h"
#include "TypeList.h" // backwards compat
-#include <OpenEXR/half.h>
+#include <Imath/half.h>
#include <openvdb/math/Math.h>
#include <openvdb/math/BBox.h>
#include <openvdb/math/Quat.h>