Skip to content

Commit

Permalink
openvdb: Fix an issue with CMP0167 CMake policy
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal committed Jul 11, 2024
1 parent ff8d89c commit fc7b725
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
8 changes: 6 additions & 2 deletions projects/openvdb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ superbuild_add_extra_cmake_args(
-DOPENVDB_USE_STATIC_LIBS:BOOL=${openvdb_build_static}
)

# https://github.com/AcademySoftwareFoundation/openvdb/issues/1747
# https://github.com/AcademySoftwareFoundation/openvdb/issues/1747
superbuild_apply_patch(openvdb decrease-gcc-min-ver
"Decrease GCC minimum version")

Expand All @@ -49,5 +49,9 @@ superbuild_apply_patch(openvdb fix-visible-dependencies-link
"Fix visible dependencies link")

# https://github.com/AcademySoftwareFoundation/openvdb/issues/1630
superbuild_apply_patch(openvdb remove-lib-prefix-static
superbuild_apply_patch(openvdb remove-lib-prefix-static
"Remove lib prefix with static lib")

# https://github.com/AcademySoftwareFoundation/openvdb/pull/1860
superbuild_apply_patch(openvdb cmake-CMP0167.patch
"Fix an issue with cmake CMP0167 policy")
15 changes: 15 additions & 0 deletions projects/patches/openvdb-cmake-CMP0167.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake
index c4213c85..11ebaca9 100644
--- a/cmake/FindOpenVDB.cmake
+++ b/cmake/FindOpenVDB.cmake
@@ -491,6 +491,10 @@ endif()
# Add standard dependencies

find_package(TBB REQUIRED COMPONENTS tbb)
+
+if(POLICY CMP0167)
+ cmake_policy(SET CMP0167 NEW)
+endif()
find_package(Boost REQUIRED COMPONENTS iostreams)

# Add deps for pyopenvdb

0 comments on commit fc7b725

Please sign in to comment.