aboutsummaryrefslogtreecommitdiff
path: root/ports/openvdb/0003-fix-cmake.patch
blob: 5db8cdde9ede530bc8ebb017037bba79fdb7da4b (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3456346..f7e5796 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -354,13 +354,9 @@ endif()
 
 if(OPENVDB_INSTALL_CMAKE_MODULES)
   set(OPENVDB_CMAKE_MODULES
-    cmake/FindBlosc.cmake
     cmake/FindJemalloc.cmake
-    cmake/FindIlmBase.cmake
     cmake/FindLog4cplus.cmake
-    cmake/FindOpenEXR.cmake
     cmake/FindOpenVDB.cmake
-    cmake/FindTBB.cmake
     cmake/OpenVDBGLFW3Setup.cmake
     cmake/OpenVDBHoudiniSetup.cmake
     cmake/OpenVDBMayaSetup.cmake
diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake
index 1dc5bc0..d84d8f1 100644
--- a/cmake/FindOpenVDB.cmake
+++ b/cmake/FindOpenVDB.cmake
@@ -457,7 +457,7 @@ endif()
 
 # Add standard dependencies
 
-find_package(TBB REQUIRED COMPONENTS tbb)
+find_package(TBB CONFIG REQUIRED)
 
 if(NOT OPENVDB_USE_STATIC_LIBS AND NOT Boost_USE_STATIC_LIBS)
   # @note  Both of these must be set for Boost 1.70 (VFX2020) to link against
@@ -607,7 +607,7 @@ elseif(NOT OPENVDB_USE_STATIC_LIBS)
 endif()
 
 if(OpenVDB_USES_BLOSC)
-  find_package(Blosc REQUIRED)
+  find_package(blosc CONFIG REQUIRED)
 endif()
 
 if(OpenVDB_USES_ZLIB)
@@ -619,7 +619,7 @@ if(OpenVDB_USES_LOG4CPLUS)
 endif()
 
 if(OpenVDB_USES_IMATH_HALF)
-  find_package(IlmBase REQUIRED COMPONENTS Half)
+  find_package(IlmBase CONFIG REQUIRED)
   if(WIN32)
     # @note OPENVDB_OPENEXR_STATICLIB is old functionality and should be removed
     if(OPENEXR_USE_STATIC_LIBS OR (${ILMBASE_LIB_TYPE} STREQUAL STATIC_LIBRARY))
@@ -664,7 +664,7 @@ set(_OPENVDB_HIDDEN_DEPENDENCIES)
 
 if(NOT OPENVDB_USE_STATIC_LIBS)
   if(OpenVDB_USES_BLOSC)
-    list(APPEND _OPENVDB_HIDDEN_DEPENDENCIES Blosc::blosc)
+    list(APPEND _OPENVDB_HIDDEN_DEPENDENCIES blosc)
   endif()
   if(OpenVDB_USES_ZLIB)
     list(APPEND _OPENVDB_HIDDEN_DEPENDENCIES ZLIB::ZLIB)
diff --git a/openvdb/openvdb/CMakeLists.txt b/openvdb/openvdb/CMakeLists.txt
index 88543df..92efaee 100644
--- a/openvdb/openvdb/CMakeLists.txt
+++ b/openvdb/openvdb/CMakeLists.txt
@@ -120,7 +120,7 @@ if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_BOOST_VERSION)
   endif()
 endif()
 
-find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbb)
+find_package(TBB CONFIG REQUIRED)
 if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_TBB_VERSION)
   if(${Tbb_VERSION} VERSION_LESS FUTURE_MINIMUM_TBB_VERSION)
     message(DEPRECATION "Support for TBB versions < ${FUTURE_MINIMUM_TBB_VERSION} "
@@ -129,7 +129,7 @@ if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_TBB_VERSION)
 endif()
 
 if(USE_IMATH_HALF)
-  find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half)
+  find_package(IlmBase CONFIG REQUIRED)
   if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_ILMBASE_VERSION)
     if(${IlmBase_VERSION} VERSION_LESS FUTURE_MINIMUM_ILMBASE_VERSION)
       message(DEPRECATION "Support for IlmBase versions < ${FUTURE_MINIMUM_ILMBASE_VERSION} "
@@ -145,14 +145,7 @@ endif()
 
 if(USE_BLOSC)
   # Find Blosc libraries
-  find_package(Blosc ${MINIMUM_BLOSC_VERSION} REQUIRED)
-  if(Blosc_FOUND AND Blosc_VERSION VERSION_GREATER MINIMUM_BLOSC_VERSION)
-    message(WARNING "The version of Blosc located is greater than ${MINIMUM_BLOSC_VERSION}. "
-      "There have been reported issues with using later versions of Blosc with OpenVDB. "
-      "OpenVDB has been tested fully against Blosc ${MINIMUM_BLOSC_VERSION}, it is "
-      "recommended that you use this version where possible."
-    )
-  endif()
+  find_package(blosc CONFIG REQUIRED)
 else()
   message(WARNING "Blosc support is disabled. It is strongly recommended to "
     "enable blosc for optimal builds of OpenVDB and to support compatible "
@@ -215,7 +208,7 @@ endif()
 # See FindOpenVDB.cmake
 
 if(USE_BLOSC)
-  list(APPEND OPENVDB_CORE_DEPENDENT_LIBS Blosc::blosc)
+  list(APPEND OPENVDB_CORE_DEPENDENT_LIBS blosc)
 endif()
 
 if(USE_BLOSC OR USE_ZLIB)
diff --git a/openvdb/openvdb/cmd/CMakeLists.txt b/openvdb/openvdb/cmd/CMakeLists.txt
index 8d9c375..14e1296 100644
--- a/openvdb/openvdb/cmd/CMakeLists.txt
+++ b/openvdb/openvdb/cmd/CMakeLists.txt
@@ -46,7 +46,7 @@ if(CONCURRENT_MALLOC STREQUAL "Jemalloc")
   find_package(Jemalloc REQUIRED)
   list(APPEND OPENVDB_BINARIES_DEPENDENT_LIBS Jemalloc::jemalloc)
 elseif(CONCURRENT_MALLOC STREQUAL "Tbbmalloc")
-  find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbbmalloc)
+  find_package(TBB CONFIG REQUIRED)
   list(APPEND OPENVDB_BINARIES_DEPENDENT_LIBS TBB::tbbmalloc)
 endif()
 
@@ -116,8 +116,8 @@ endif()
 #### vdb_render
 
 if(OPENVDB_BUILD_VDB_RENDER)
-  find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half Iex IlmThread Imath)
-  find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED COMPONENTS IlmImf)
+  find_package(IlmBase CONFIG REQUIRED)
+  find_package(OpenEXR CONFIG REQUIRED)
 
   set(VDB_RENDER_SOURCE_FILES openvdb_render.cc)
   add_executable(vdb_render ${VDB_RENDER_SOURCE_FILES})