OpenVDB.cmake 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. if(BUILD_SHARED_LIBS)
  2. set(_build_shared ON)
  3. set(_build_static OFF)
  4. else()
  5. set(_build_shared OFF)
  6. set(_build_static ON)
  7. endif()
  8. prusaslicer_add_cmake_project(OpenVDB
  9. URL https://github.com/tamasmeszaros/openvdb/archive/refs/tags/v6.2.1-prusa3d.zip #v6.2.1 patched
  10. URL_HASH SHA256=caf9f0c91976722883ff9cb32420ef142af22f7e625fc643b91c23d6e4172f62
  11. DEPENDS dep_TBB dep_Blosc dep_OpenEXR dep_Boost
  12. CMAKE_ARGS
  13. -DCMAKE_POSITION_INDEPENDENT_CODE=ON
  14. -DOPENVDB_BUILD_PYTHON_MODULE=OFF
  15. -DUSE_BLOSC=ON
  16. -DOPENVDB_CORE_SHARED=${_build_shared}
  17. -DOPENVDB_CORE_STATIC=${_build_static}
  18. -DOPENVDB_ENABLE_RPATH:BOOL=OFF
  19. -DTBB_STATIC=${_build_static}
  20. -DOPENVDB_BUILD_VDB_PRINT=ON
  21. -DDISABLE_DEPENDENCY_VERSION_CHECKS=ON # Centos6 has old zlib
  22. )
  23. if (MSVC)
  24. if (${DEP_DEBUG})
  25. ExternalProject_Get_Property(dep_OpenVDB BINARY_DIR)
  26. ExternalProject_Add_Step(dep_OpenVDB build_debug
  27. DEPENDEES build
  28. DEPENDERS install
  29. COMMAND ${CMAKE_COMMAND} ../dep_OpenVDB -DOPENVDB_BUILD_VDB_PRINT=OFF
  30. COMMAND msbuild /m /P:Configuration=Debug INSTALL.vcxproj
  31. WORKING_DIRECTORY "${BINARY_DIR}"
  32. )
  33. endif ()
  34. endif ()