Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenVDB and Alembic reader #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
13 changes: 13 additions & 0 deletions src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ set_target_properties(partio PROPERTIES
POSITION_INDEPENDENT_CODE ON
SOVERSION ${PARTIO_VERSION_MAJOR})

set(TBB_INCLUDE_DIRS "$ENV{TBB_ROOT}/include")
set(CMAKE_MODULE_PATH "$ENV{OpenVDB_ROOT}/lib/cmake/OpenVDB"
"${OpenVDB_ROOT}/lib/cmake/OpenVDB"
${CMAKE_MODULE_PATH})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMAKE_MODULE_PATH usually shouldn't need to be modified. If you set CMAKE_PREFIX_PATH to include the OpenVDB_ROOT then in theory find_package(OpenVDB) should work without needing to special-case openvdb here.

find_package(OpenVDB COMPONENTS openvdb)
find_package(Alembic)
find_package(Boost)
find_package(TBB)


target_link_libraries(partio PRIVATE Alembic::Alembic OpenVDB::openvdb)
target_include_directories(partio PRIVATE ${TBB_INCLUDE_DIRS})

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now partio has a really minimal set of dependencies.

Since these are new dependencies it would be good to ease into them. Can we please make these opt-in and not built by default?

I would suggest adding some option(...) variables that default to OFF. Maybe call them something like PARTIO_ENABLE_ALEMBIC and PARTIO_ENABLE_OPENVDB so that we can opt-in to these settings.

TBB is needed for openvb so we can bundle those settings alongside PARTIO_ENABLE_OPENVDB.

target_include_directories(partio
PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
Expand Down
Loading