Fix T54457: build error with OpenVDB versions newer than 3.

Solution provided by Sven-Hendrik Haase.
This commit is contained in:
Brecht Van Lommel
2018-03-29 07:20:16 +02:00
parent 52302757cd
commit ca5f3dd220
2 changed files with 2 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ set(SRC
if(WITH_OPENVDB)
add_definitions(
-DWITH_OPENVDB
-DOPENVDB_3_ABI_COMPATIBLE
)
list(APPEND INC_SYS

View File

@@ -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());