Skip to content

Commit 7aabc2b

Browse files
authored
build: Look for boost headers for OpenVDBs older than 12 (AcademySoftwareFoundation#4873)
Signed-off-by: Alex Fuller <[email protected]>
1 parent 5280eb6 commit 7aabc2b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/cmake/modules/FindOpenVDB.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@ if (OpenVDB_FOUND)
8989
set_property(TARGET OpenVDB::openvdb APPEND PROPERTY
9090
IMPORTED_LOCATION "${OPENVDB_LIBRARIES}")
9191
endif ()
92+
93+
# Note: OpenVDB older than 12 needs Boost headers.
94+
if (OpenVDB_VERSION VERSION_LESS 12)
95+
find_package (Boost)
96+
if (Boost_FOUND)
97+
list(APPEND OPENVDB_INCLUDES ${Boost_INCLUDE_DIRS})
98+
else()
99+
unset(OpenVDB_FOUND)
100+
endif()
101+
endif()
92102
endif ()
93103

94104
MARK_AS_ADVANCED(

0 commit comments

Comments
 (0)