[Bf-blender-cvs] [ca5f3dd2200] master: Fix T54457: build error with OpenVDB versions newer than 3.
Brecht Van Lommel
noreply at git.blender.org
Thu Mar 29 07:23:16 CEST 2018
Commit: ca5f3dd2200725712a665705fc25e20a208d6295
Author: Brecht Van Lommel
Date: Thu Mar 29 07:20:16 2018 +0200
Branches: master
https://developer.blender.org/rBca5f3dd2200725712a665705fc25e20a208d6295
Fix T54457: build error with OpenVDB versions newer than 3.
Solution provided by Sven-Hendrik Haase.
===================================================================
M intern/openvdb/CMakeLists.txt
M intern/openvdb/intern/openvdb_writer.cc
===================================================================
diff --git a/intern/openvdb/CMakeLists.txt b/intern/openvdb/CMakeLists.txt
index e0ecdb52929..4b872f25d45 100644
--- a/intern/openvdb/CMakeLists.txt
+++ b/intern/openvdb/CMakeLists.txt
@@ -38,6 +38,7 @@ set(SRC
if(WITH_OPENVDB)
add_definitions(
-DWITH_OPENVDB
+ -DOPENVDB_3_ABI_COMPATIBLE
)
list(APPEND INC_SYS
diff --git a/intern/openvdb/intern/openvdb_writer.cc b/intern/openvdb/intern/openvdb_writer.cc
index e886c5a76a8..b83691ac7de 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)
m_grids->push_back(grid.copyGrid());
#else
m_grids->push_back(grid.copyGridWithNewTree());
More information about the Bf-blender-cvs
mailing list