Blosc.cmake 1.0 KB

12345678910111213141516171819202122232425262728
  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. bambustudio_add_cmake_project(Blosc
  9. #URL https://github.com/Blosc/c-blosc/archive/refs/tags/v1.17.0.zip
  10. #URL_HASH SHA256=7463a1df566704f212263312717ab2c36b45d45cba6cd0dccebf91b2cc4b4da9
  11. URL https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip
  12. URL_HASH SHA256=dcb48bf43a672fa3de6a4b1de2c4c238709dad5893d1e097b8374ad84b1fc3b3
  13. DEPENDS ${ZLIB_PKG}
  14. # Patching upstream does not work this way with git version 2.28 installed on mac worker
  15. # PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/blosc-mods.patch
  16. CMAKE_ARGS
  17. -DCMAKE_POSITION_INDEPENDENT_CODE=ON
  18. -DBUILD_SHARED=${_build_shared}
  19. -DBUILD_STATIC=${_build_static}
  20. -DBUILD_TESTS=OFF
  21. -DBUILD_BENCHMARKS=OFF
  22. -DPREFER_EXTERNAL_ZLIB=ON
  23. )
  24. if (MSVC)
  25. add_debug_dep(dep_Blosc)
  26. endif ()