summarylogtreecommitdiffstats
path: root/0003-openexr3.patch
blob: 07dc6691daa066903a4c0aa67f69577463bf207b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
diff --git a/cmake/modules/FindOpenVDB.cmake b/cmake/modules/FindOpenVDB.cmake
index 4fde5fa4a..566e73a5e 100644
--- a/cmake/modules/FindOpenVDB.cmake
+++ b/cmake/modules/FindOpenVDB.cmake
@@ -347,6 +347,7 @@
 find_package(TBB ${_quiet} ${_required} COMPONENTS tbb)
 find_package(ZLIB ${_quiet} ${_required})
 find_package(Boost ${_quiet} ${_required} COMPONENTS iostreams system )
+find_package(Imath CONFIG)
 
 # Use GetPrerequisites to see which libraries this OpenVDB lib has linked to
 # which we can query for optional deps. This basically runs ldd/otoll/objdump
@@ -419,7 +401,7 @@ foreach(PREREQUISITE ${_OPENVDB_PREREQUISITE_LIST})
     set(OpenVDB_USES_LOG4CPLUS ON)
   endif()
 
-  string(FIND ${PREREQUISITE} "IlmImf" _HAS_DEP)
+  string(FIND ${PREREQUISITE} "OpenEXR" _HAS_DEP)
   if(NOT ${_HAS_DEP} EQUAL -1)
     set(OpenVDB_USES_ILM ON)
   endif()
@@ -450,11 +432,7 @@ if(OpenVDB_USES_LOG4CPLUS)
   find_package(Log4cplus ${_quiet} ${_required})
 endif()
 
-if(OpenVDB_USES_ILM)
-  find_package(IlmBase ${_quiet} ${_required})
-endif()
-
-if(OpenVDB_USES_EXR)
+if(OpenVDB_USES_ILM OR OpenVDB_USES_EXR)
   find_package(OpenEXR ${_quiet} ${_required})
 endif()
 
@@ -471,6 +449,7 @@ endif()
 set(_OPENVDB_VISIBLE_DEPENDENCIES
   Boost::iostreams
   Boost::system
+  Imath::Imath
 )
 
 set(_OPENVDB_DEFINITIONS)
@@ -481,10 +459,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 "-DOPENVDB_TOOLS_RAYTRACER_USE_EXR")
 endif()