Skip to content

Commit

Permalink
build(deps): Raise OpenVDB minimum to 9.0
Browse files Browse the repository at this point in the history
Soon we'll raise the minimum OpenEXR to 3.1, and OpenVDB 9.0 is the
first version to support that. And because OpenVDB has Imath types in
its public APIs, it's really hard to mix and match our using an
OpenEXR/Imath 3 internal to OIIO with an OpenVDB that uses an
OpenEXR/IlmBase 2.

Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Apr 6, 2024
1 parent 8799aed commit bd7fb67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
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
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

0 comments on commit bd7fb67

Please sign in to comment.