Blosc.cmake 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. if(IS_CROSS_COMPILE AND APPLE)
  9. prusaslicer_add_cmake_project(Blosc
  10. #URL https://github.com/Blosc/c-blosc/archive/refs/tags/v1.17.0.zip
  11. #URL_HASH SHA256=7463a1df566704f212263312717ab2c36b45d45cba6cd0dccebf91b2cc4b4da9
  12. URL https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip
  13. URL_HASH SHA256=dcb48bf43a672fa3de6a4b1de2c4c238709dad5893d1e097b8374ad84b1fc3b3
  14. DEPENDS ${ZLIB_PKG}
  15. # Patching upstream does not work this way with git version 2.28 installed on mac worker
  16. # PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/blosc-mods.patch
  17. CMAKE_ARGS
  18. -DCMAKE_POSITION_INDEPENDENT_CODE=ON
  19. -DBUILD_SHARED=${_build_shared}
  20. -DBUILD_STATIC=${_build_static}
  21. -DBUILD_TESTS=OFF
  22. -DBUILD_BENCHMARKS=OFF
  23. -DPREFER_EXTERNAL_ZLIB=ON
  24. -DDEACTIVATE_SSE2=ON
  25. -DDEACTIVATE_AVX2=ON
  26. )
  27. else()
  28. prusaslicer_add_cmake_project(Blosc
  29. #URL https://github.com/Blosc/c-blosc/archive/refs/tags/v1.17.0.zip
  30. #URL_HASH SHA256=7463a1df566704f212263312717ab2c36b45d45cba6cd0dccebf91b2cc4b4da9
  31. URL https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip
  32. URL_HASH SHA256=dcb48bf43a672fa3de6a4b1de2c4c238709dad5893d1e097b8374ad84b1fc3b3
  33. DEPENDS ${ZLIB_PKG}
  34. # Patching upstream does not work this way with git version 2.28 installed on mac worker
  35. # PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/blosc-mods.patch
  36. CMAKE_ARGS
  37. -DCMAKE_POSITION_INDEPENDENT_CODE=ON
  38. -DBUILD_SHARED=${_build_shared}
  39. -DBUILD_STATIC=${_build_static}
  40. -DBUILD_TESTS=OFF
  41. -DBUILD_BENCHMARKS=OFF
  42. -DPREFER_EXTERNAL_ZLIB=ON
  43. )
  44. endif()
  45. if (MSVC)
  46. add_debug_dep(dep_Blosc)
  47. endif ()