OpenVDB.cmake 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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. set (_openvdb_vdbprint ON)
  9. if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR NOT ${CMAKE_BUILD_TYPE} STREQUAL Release)
  10. # Build fails on raspberry pi due to missing link directive to latomic
  11. # Let's hope it will be fixed soon.
  12. set (_openvdb_vdbprint OFF)
  13. endif ()
  14. add_cmake_project(OpenVDB
  15. # 8.2 patched
  16. URL https://github.com/prusa3d/openvdb/archive/a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip
  17. URL_HASH SHA256=f353e7b99bd0cbfc27ac9082de51acf32a8bc0b3e21ff9661ecca6f205ec1d81
  18. CMAKE_ARGS
  19. -DCMAKE_POSITION_INDEPENDENT_CODE=ON
  20. -DOPENVDB_BUILD_PYTHON_MODULE=OFF
  21. -DUSE_BLOSC=ON
  22. -DOPENVDB_CORE_SHARED=${_build_shared}
  23. -DOPENVDB_CORE_STATIC=${_build_static}
  24. -DOPENVDB_ENABLE_RPATH:BOOL=OFF
  25. -DTBB_STATIC=${_build_static}
  26. -DOPENVDB_BUILD_VDB_PRINT=${_openvdb_vdbprint}
  27. -DDISABLE_DEPENDENCY_VERSION_CHECKS=ON # Centos6 has old zlib
  28. )
  29. set(DEP_OpenVDB_DEPENDS TBB Blosc OpenEXR Boost)