Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-02 19:55:10 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-02 20:13:04 +0300
commit71d7d6cd8c431b7f4fac8d65a4eaedf3cff6c8f6 (patch)
treef247f9a5ad1120e603583b1b04d2b3ec7ac14898 /intern/openvdb
parent4041385ddd68460d4dd04825431c4e2495c0c2a9 (diff)
Build: add WITH_OPENVDB_3_ABI_COMPATIBLE option.
Better fix for T54457. It seems Debian compiles OpenVDB without ABI 3 compatibility, while Arch does enable it as is the default in the OpeVDB CMake build system. So now there's an option that the distribution can set depending on how they compile their OpenVDB package.
Diffstat (limited to 'intern/openvdb')
-rw-r--r--intern/openvdb/CMakeLists.txt7
-rw-r--r--intern/openvdb/intern/openvdb_writer.cc2
2 files changed, 7 insertions, 2 deletions
diff --git a/intern/openvdb/CMakeLists.txt b/intern/openvdb/CMakeLists.txt
index 4b872f25d45..f666dc78e75 100644
--- a/intern/openvdb/CMakeLists.txt
+++ b/intern/openvdb/CMakeLists.txt
@@ -38,9 +38,14 @@ set(SRC
if(WITH_OPENVDB)
add_definitions(
-DWITH_OPENVDB
- -DOPENVDB_3_ABI_COMPATIBLE
)
+ if(WITH_OPENVDB_3_ABI_COMPATIBLE)
+ add_definitions(
+ -DOPENVDB_3_ABI_COMPATIBLE
+ )
+ endif()
+
list(APPEND INC_SYS
${BOOST_INCLUDE_DIR}
${TBB_INCLUDE_DIRS}
diff --git a/intern/openvdb/intern/openvdb_writer.cc b/intern/openvdb/intern/openvdb_writer.cc
index b83691ac7de..bedcfe65552 100644
--- a/intern/openvdb/intern/openvdb_writer.cc
+++ b/intern/openvdb/intern/openvdb_writer.cc
@@ -45,7 +45,7 @@ void OpenVDBWriter::insert(const openvdb::GridBase::Ptr &grid)
void OpenVDBWriter::insert(const openvdb::GridBase &grid)
{
-#if (OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER >= 3)
+#if (OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER <= 3) || defined(OPENVDB_3_ABI_COMPATIBLE)
m_grids->push_back(grid.copyGrid());
#else
m_grids->push_back(grid.copyGridWithNewTree());