2021-03-22 12:36:42 +00:00
|
|
|
if(BUILD_SHARED_LIBS)
|
|
|
|
set(_build_shared ON)
|
|
|
|
set(_build_static OFF)
|
|
|
|
else()
|
|
|
|
set(_build_shared OFF)
|
|
|
|
set(_build_static ON)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
prusaslicer_add_cmake_project(OpenVDB
|
2021-03-22 19:27:18 +00:00
|
|
|
URL https://github.com/tamasmeszaros/openvdb/archive/refs/tags/v6.2-prusa3d.zip #v6.2.1 patched
|
|
|
|
URL_HASH SHA256=3429d0b6a51298ea2bbdd189c741db0a7d6dbda2388afcce76e1031103d1dafe
|
2021-03-22 13:35:49 +00:00
|
|
|
DEPENDS dep_TBB dep_Blosc dep_OpenEXR dep_Boost
|
2021-03-22 12:36:42 +00:00
|
|
|
CMAKE_ARGS
|
|
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
|
|
|
-DOPENVDB_BUILD_PYTHON_MODULE=OFF
|
|
|
|
-DUSE_BLOSC=ON
|
|
|
|
-DOPENVDB_CORE_SHARED=${_build_shared}
|
|
|
|
-DOPENVDB_CORE_STATIC=${_build_static}
|
|
|
|
-DOPENVDB_ENABLE_RPATH:BOOL=OFF
|
|
|
|
-DTBB_STATIC=${_build_static}
|
|
|
|
-DOPENVDB_BUILD_VDB_PRINT=ON
|
|
|
|
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON # Centos6 has old zlib
|
|
|
|
)
|
|
|
|
|
|
|
|
if (MSVC)
|
|
|
|
if (${DEP_DEBUG})
|
|
|
|
ExternalProject_Get_Property(dep_OpenVDB BINARY_DIR)
|
|
|
|
ExternalProject_Add_Step(dep_OpenVDB build_debug
|
|
|
|
DEPENDEES build
|
|
|
|
DEPENDERS install
|
|
|
|
COMMAND ${CMAKE_COMMAND} ../dep_OpenVDB -DOPENVDB_BUILD_VDB_PRINT=OFF
|
|
|
|
COMMAND msbuild /m /P:Configuration=Debug INSTALL.vcxproj
|
|
|
|
WORKING_DIRECTORY "${BINARY_DIR}"
|
|
|
|
)
|
|
|
|
endif ()
|
|
|
|
endif ()
|