Skip to content

Commit c4d64b0

Browse files
committed
Add new symbols for specifying min C-Blosc2 version
1 parent ff7e64c commit c4d64b0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ endif()
1414

1515
project(python-blosc2)
1616

17+
set(BLOSC2_MIN_VERSION 3.0.0)
18+
set(BLOSC2_BUNDLED_VERSION v3.0.2)
19+
1720
if(WIN32 AND NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
1821
message(FATAL_ERROR "Windows builds require clang-cl. Set CC/CXX to clang-cl or configure CMake with -T ClangCL.")
1922
endif()
@@ -118,7 +121,7 @@ endif()
118121
if(USE_SYSTEM_BLOSC2)
119122
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
120123
find_package(PkgConfig REQUIRED)
121-
pkg_check_modules(Blosc2 REQUIRED IMPORTED_TARGET blosc2)
124+
pkg_check_modules(Blosc2 REQUIRED IMPORTED_TARGET blosc2>=${BLOSC2_MIN_VERSION})
122125
target_link_libraries(blosc2_ext PRIVATE PkgConfig::Blosc2)
123126
else()
124127
set(STATIC_LIB ON CACHE BOOL "Build a static version of the blosc library.")
@@ -137,7 +140,7 @@ else()
137140
include(FetchContent)
138141
FetchContent_Declare(blosc2
139142
GIT_REPOSITORY https://github.com/Blosc/c-blosc2
140-
GIT_TAG 51439748201cdc49c2ce2ec8a8b4fac2b810300f
143+
GIT_TAG ${BLOSC2_BUNDLED_VERSION}
141144
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../c-blosc2
142145
)
143146
FetchContent_MakeAvailable(blosc2)

0 commit comments

Comments
 (0)