Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/cmake/externalpackages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,9 @@ checked_find_package (OpenJPEG VERSION_MIN 2.0
# find them reliable at all, so we stick to our FindOpenJPEG.cmake module.

checked_find_package (OpenVDB
VERSION_MIN 5.0
VERSION_MIN 9.0
DEPS TBB
DEFINITIONS -DUSE_OPENVDB=1)
if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17)
message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}")
set (OpenVDB_FOUND 0)
endif ()

checked_find_package (Ptex PREFER_CONFIG)
if (NOT Ptex_FOUND OR NOT Ptex_VERSION)
Expand Down
1 change: 1 addition & 0 deletions src/cmake/modules/FindOpenVDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenVDB
)

if (OpenVDB_FOUND)
set (OpenVDB_VERSION ${OPENVDB_VERSION})
set(OPENVDB_LIBRARIES ${OPENVDB_LIBRARY})
set(OPENVDB_INCLUDES ${OPENVDB_INCLUDE_DIR})

Expand Down
8 changes: 1 addition & 7 deletions src/openvdb.imageio/openvdbinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
#include <openvdb/openvdb.h>
#include <openvdb/tools/Dense.h>

// Try to use the long form/abi version string introduced in 5.0
#if OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER <= 4
# define OIIO_OPENVDB_VERSION OPENVDB_LIBRARY_VERSION_STRING
#else
# define OIIO_OPENVDB_VERSION OPENVDB_LIBRARY_ABI_VERSION_STRING
#endif


OIIO_PLUGIN_NAMESPACE_BEGIN
Expand Down Expand Up @@ -598,7 +592,7 @@ OIIO_EXPORT int openvdb_imageio_version = OIIO_PLUGIN_VERSION;
OIIO_EXPORT const char*
openvdb_imageio_library_version()
{
return "OpenVDB " OIIO_OPENVDB_VERSION;
return "OpenVDB " OPENVDB_LIBRARY_ABI_VERSION_STRING;
}

OIIO_PLUGIN_EXPORTS_END
Expand Down