-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from mwestphal/adding_openvdb
Adding openvdb to the superbuild
- Loading branch information
Showing
15 changed files
with
206 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
if (NOT BUILD_SHARED_LIBS_openvdb STREQUAL "<same>") | ||
set(openvdb_build_shared ${BUILD_SHARED_LIBS_openvdb}) | ||
else () | ||
set(openvdb_build_shared ${BUILD_SHARED_LIBS}) | ||
endif () | ||
if (openvdb_build_shared) | ||
set(openvdb_build_static OFF) | ||
else () | ||
set(openvdb_build_static ON) | ||
endif () | ||
|
||
# CMAKE_MSVC_RUNTIME_LIBRARY is needed because of https://github.com/AcademySoftwareFoundation/openvdb/issues/1131 | ||
superbuild_add_project(openvdb | ||
BUILD_SHARED_LIBS_INDEPENDENT | ||
DEPENDS tbb cxx17 blosc zlib boost lz4 zstd | ||
LICENSE_FILES | ||
LICENSE | ||
CMAKE_ARGS | ||
-DCMAKE_INSTALL_LIBDIR:PATH=lib | ||
-DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreadedDLL | ||
-DOPENVDB_BUILD_VDB_PRINT:BOOL=OFF | ||
-DOPENVDB_CORE_SHARED:BOOL=${openvdb_build_shared} | ||
-DOPENVDB_CORE_STATIC:BOOL=${openvdb_build_static} | ||
-DUSE_BLOSC:BOOL=ON | ||
-DUSE_CCACHE:BOOL=OFF | ||
-DUSE_EXPLICIT_INSTANTIATION:BOOL=OFF | ||
-DUSE_ZLIB:BOOL=ON) | ||
|
||
# Boost_USE_STATIC_LIBS is needed on Windows because FindBoost.cmake default to static there | ||
# OPENVDB_USE_STATIC_LIBS is needed because FindOpenVDB.cmake is not smart enough to find it out itself | ||
# CMAKE_MODULE_PATH is needed because of https://github.com/AcademySoftwareFoundation/openvdb/issues/1160 | ||
superbuild_add_extra_cmake_args( | ||
-DBoost_USE_STATIC_LIBS:BOOL=OFF | ||
-DCMAKE_MODULE_PATH:PATH=<INSTALL_DIR>/lib/cmake/OpenVDB | ||
-DOPENVDB_USE_STATIC_LIBS:BOOL=${openvdb_build_static} | ||
) | ||
|
||
# https://github.com/AcademySoftwareFoundation/openvdb/issues/1747 | ||
superbuild_apply_patch(openvdb decrease-gcc-min-ver | ||
"Decrease GCC minimum version") | ||
|
||
# https://github.com/AcademySoftwareFoundation/openvdb/issues/1741 | ||
# https://github.com/AcademySoftwareFoundation/openvdb/issues/1740 | ||
superbuild_apply_patch(openvdb remove-not-needed-cmake-modules | ||
"Remove not needed cmake modules") | ||
|
||
# https://github.com/AcademySoftwareFoundation/openvdb/issues/1630 | ||
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 | ||
"Remove lib prefix with static lib") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From ef0a2522977d76bfe760c2506084a7da733d3890 Mon Sep 17 00:00:00 2001 | ||
From: Mathieu Westphal <[email protected]> | ||
Date: Thu, 21 Dec 2023 07:51:00 +0100 | ||
Subject: [PATCH] Decrease gcc version | ||
|
||
--- | ||
cmake/config/OpenVDBVersions.cmake | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/cmake/config/OpenVDBVersions.cmake b/cmake/config/OpenVDBVersions.cmake | ||
index 7caace6..f956b8f 100644 | ||
--- a/cmake/config/OpenVDBVersions.cmake | ||
+++ b/cmake/config/OpenVDBVersions.cmake | ||
@@ -34,7 +34,7 @@ if(NOT DISABLE_DEPENDENCY_VERSION_CHECKS) | ||
# What's usually important is that the version of libstdc++ and glibc in use | ||
# matches. Compilers other than GCC should provide options to ensure this | ||
# targetting e.g. --gcc-toolchain and -fgnuc-version with Clang. | ||
- set(MINIMUM_GCC_VERSION 9.3.1) | ||
+ set(MINIMUM_GCC_VERSION 8.4.0) | ||
set(MINIMUM_CLANG_VERSION 5.0) | ||
set(MINIMUM_ICC_VERSION 19) | ||
set(MINIMUM_MSVC_VERSION 19.28) # 1928 (Visual Studio 2019 Version 16.8 + 16.9) | ||
-- | ||
2.43.0 | ||
|
35 changes: 35 additions & 0 deletions
35
projects/patches/openvdb-fix-visible-dependencies-link.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From 2da63bf76ba370840c5f3cb2f88b2a28c47bf2d7 Mon Sep 17 00:00:00 2001 | ||
From: Mathieu Westphal <[email protected]> | ||
Date: Wed, 3 Jan 2024 19:46:04 +0100 | ||
Subject: [PATCH] visible deps | ||
|
||
--- | ||
cmake/FindOpenVDB.cmake | 12 +++++------- | ||
1 file changed, 5 insertions(+), 7 deletions(-) | ||
|
||
diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake | ||
index c4213c8..d988db6 100644 | ||
--- a/cmake/FindOpenVDB.cmake | ||
+++ b/cmake/FindOpenVDB.cmake | ||
@@ -692,13 +692,11 @@ endif() | ||
|
||
set(_OPENVDB_HIDDEN_DEPENDENCIES) | ||
|
||
-if(NOT OPENVDB_USE_STATIC_LIBS) | ||
- if(OpenVDB_USES_BLOSC) | ||
- list(APPEND _OPENVDB_HIDDEN_DEPENDENCIES Blosc::blosc) | ||
- endif() | ||
- if(OpenVDB_USES_ZLIB) | ||
- list(APPEND _OPENVDB_HIDDEN_DEPENDENCIES ZLIB::ZLIB) | ||
- endif() | ||
+if(OpenVDB_USES_BLOSC) | ||
+ list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES Blosc::blosc) | ||
+endif() | ||
+if(OpenVDB_USES_ZLIB) | ||
+ list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES ZLIB::ZLIB) | ||
endif() | ||
|
||
if(openvdb_je IN_LIST OpenVDB_FIND_COMPONENTS) | ||
-- | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From 1f41a0d72b6f51f117888adece18a61a2a11c6e7 Mon Sep 17 00:00:00 2001 | ||
From: Mathieu Westphal <[email protected]> | ||
Date: Mon, 1 Jan 2024 14:59:26 +0100 | ||
Subject: [PATCH] openvdb remove lib prefix static | ||
|
||
--- | ||
openvdb/openvdb/CMakeLists.txt | 1 - | ||
1 file changed, 1 deletion(-) | ||
|
||
diff --git a/openvdb/openvdb/CMakeLists.txt b/openvdb/openvdb/CMakeLists.txt | ||
index 33d4e5c..2c16443 100644 | ||
--- a/openvdb/openvdb/CMakeLists.txt | ||
+++ b/openvdb/openvdb/CMakeLists.txt | ||
@@ -678,7 +678,6 @@ if(OPENVDB_CORE_STATIC) | ||
target_compile_options(openvdb_static PUBLIC | ||
"$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/MT$<$<CONFIG:Debug>:d>>") | ||
endif() | ||
- set_target_properties(openvdb_static PROPERTIES PREFIX "lib") | ||
endif() | ||
endif() | ||
|
||
-- | ||
2.35.1.windows.2 | ||
|
28 changes: 28 additions & 0 deletions
28
projects/patches/openvdb-remove-not-needed-cmake-modules.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 6fdc28ccdc156535b20f8f446d7a6f21e3f0973c Mon Sep 17 00:00:00 2001 | ||
From: Mathieu Westphal <[email protected]> | ||
Date: Sun, 24 Dec 2023 00:45:04 +0800 | ||
Subject: [PATCH] Remove not needed cmake modules | ||
|
||
--- | ||
CMakeLists.txt | 4 ---- | ||
1 file changed, 4 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 8329dda..fe1dd23 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -285,11 +285,7 @@ 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 | ||
-- | ||
2.43.0 | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule superbuild
updated
from 5dd2ff to 8bd27b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters