Skip to content

Commit abe7fc7

Browse files
committed
Implement PEP recommendations
1 parent eae604d commit abe7fc7

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,23 @@ else()
4545
set(BUILD_BENCHMARKS OFF CACHE BOOL "Build C-Blosc2 benchmarks")
4646
set(BUILD_FUZZERS OFF CACHE BOOL "Build C-Blosc2 fuzzers")
4747
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
48-
# we want the binaries of the C-Blosc2 library to go into the wheels
48+
set(CMAKE_INSTALL_INCLUDEDIR ${SKBUILD_PLATLIB_DIR}/blosc2/include) # directory for include files
49+
set(CMAKE_INSTALL_LIBDIR ${SKBUILD_PLATLIB_DIR}/blosc2/lib) # directory for libblosc2 and pkgconfig
50+
set(Blosc2_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/blosc2) #directory for cmake files
51+
# we will put the binaries of the C-Blosc2 library into the wheels according to PEP
4952
set(BLOSC_INSTALL ON)
5053
include(FetchContent)
5154
FetchContent_Declare(blosc2
5255
GIT_REPOSITORY https://github.com/Blosc/c-blosc2
53-
GIT_TAG 5a2b0ed9c4d801230c118fbc5811817055b5a3f5 # v2.22.0
56+
GIT_TAG 011c9e537f28299c536294d842e1a3d0e41db24f # openzl_plugin + miniexpr
5457
)
5558
FetchContent_MakeAvailable(blosc2)
5659
include_directories("${blosc2_SOURCE_DIR}/include")
5760
target_link_libraries(blosc2_ext PRIVATE blosc2_static)
5861
endif()
5962

60-
add_custom_command(
61-
TARGET blosc2_ext POST_BUILD
62-
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:blosc2_ext> ${CMAKE_SOURCE_DIR}/blosc2
63+
# Python extension -> site-packages/blosc2
64+
install(
65+
TARGETS blosc2_ext
66+
LIBRARY DESTINATION ${SKBUILD_PLATLIB_DIR}/blosc2
6367
)
64-
65-
install(TARGETS blosc2_ext LIBRARY DESTINATION blosc2)

0 commit comments

Comments
 (0)