From 78391def6e41f994e9089b346332c909b9ccc58a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 26 Feb 2020 15:11:24 +0100 Subject: Cleanup: deduplicate OpenVDB library definitions/include/libs logic This will more important when we start using OpenVDB in more modules. --- CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c6a5de4aa7..0116446454e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -899,6 +899,28 @@ if(NOT WITH_SYSTEM_EIGEN3) set(EIGEN3_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/Eigen3) endif() +if(WITH_OPENVDB) + list(APPEND OPENVDB_DEFINITIONS -DWITH_OPENVDB) + + if(WITH_OPENVDB_3_ABI_COMPATIBLE) + list(APPEND OPENVDB_DEFINITIONS -DOPENVDB_3_ABI_COMPATIBLE) + endif() + + list(APPEND OPENVDB_INCLUDE_DIRS + ${BOOST_INCLUDE_DIR} + ${TBB_INCLUDE_DIRS} + ${OPENEXR_INCLUDE_DIRS}) + + list(APPEND OPENVDB_LIBRARIES ${OPENEXR_LIBRARIES} ${ZLIB_LIBRARIES}) + + if(WITH_OPENVDB_BLOSC) + list(APPEND OPENVDB_DEFINITIONS -DWITH_OPENVDB_BLOSC) + list(APPEND OPENVDB_LIBRARIES ${BLOSC_LIBRARIES} ${ZLIB_LIBRARIES}) + endif() + + list(APPEND OPENVDB_LIBRARIES ${BOOST_LIBRARIES} ${TBB_LIBRARIES}) +endif() + #----------------------------------------------------------------------------- # Configure OpenGL. -- cgit v1.2.3