-
Notifications
You must be signed in to change notification settings - Fork 6.4k
/
fix_cmake.patch
115 lines (103 loc) · 4.16 KB
/
fix_cmake.patch
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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8329dda9..71f45701 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -284,12 +284,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
if(OPENVDB_INSTALL_CMAKE_MODULES)
set(OPENVDB_CMAKE_MODULES
- cmake/FindBlosc.cmake
cmake/FindJemalloc.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 c4213c85..86b24e9d 100644
--- a/cmake/FindOpenVDB.cmake
+++ b/cmake/FindOpenVDB.cmake
@@ -490,7 +490,7 @@ endif()
# Add standard dependencies
-find_package(TBB REQUIRED COMPONENTS tbb)
+find_package(TBB CONFIG REQUIRED)
find_package(Boost REQUIRED COMPONENTS iostreams)
# Add deps for pyopenvdb
@@ -641,7 +641,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)
@@ -694,7 +694,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 33d4e5cc..63699b2c 100644
--- a/openvdb/openvdb/CMakeLists.txt
+++ b/openvdb/openvdb/CMakeLists.txt
@@ -123,7 +123,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} "
@@ -152,26 +152,7 @@ endif()
if(USE_BLOSC)
# Find Blosc libraries
- find_package(Blosc ${MINIMUM_BLOSC_VERSION} REQUIRED)
- if(Blosc_VERSION)
- if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_BLOSC_VERSION)
- if(${Blosc_VERSION} VERSION_LESS FUTURE_MINIMUM_BLOSC_VERSION)
- message(DEPRECATION "Support for Blosc versions < ${FUTURE_MINIMUM_BLOSC_VERSION} "
- "is deprecated and will be removed.")
- endif()
- endif()
- # Print a warning if using of the blosc versions with regression issues
- # with Blosc 1.5.0 caches.
- if((Blosc_VERSION VERSION_GREATER_EQUAL 1.11.0 AND
- Blosc_VERSION VERSION_LESS 1.14.0) OR
- (Blosc_VERSION VERSION_GREATER_EQUAL 1.16.0 AND
- Blosc_VERSION VERSION_LESS 1.16.2))
- message(WARNING "The following Blosc versions are incompatible with the "
- "recommended builds of OpenVDB: [1.11.0 -> 1.14.0) [1.16.0, 1.16.1]. "
- "Found Blosc version '${Blosc_VERSION}' which falls in this range. We "
- "strongly recommend using the new future minimum version '${FUTURE_MINIMUM_BLOSC_VERSION}'")
- endif()
- 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 "
@@ -228,7 +209,11 @@ endif()
# /usr/local
if(USE_BLOSC)
- list(APPEND OPENVDB_CORE_DEPENDENT_LIBS Blosc::blosc)
+ if(BUILD_SHARED_LIBS)
+ list(APPEND OPENVDB_CORE_DEPENDENT_LIBS blosc_shared)
+ else()
+ list(APPEND OPENVDB_CORE_DEPENDENT_LIBS blosc_static)
+ endif()
endif()
if(USE_BLOSC OR USE_ZLIB)
diff --git a/openvdb_cmd/CMakeLists.txt b/openvdb_cmd/CMakeLists.txt
index c4351f49..b4803341 100644
--- a/openvdb_cmd/CMakeLists.txt
+++ b/openvdb_cmd/CMakeLists.txt
@@ -53,7 +53,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()