2020-05-14 07:59:31 +08:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
2024-03-12 11:15:52 +08:00
|
|
|
project(h5py-lzf LANGUAGES C)
|
2020-05-14 07:59:31 +08:00
|
|
|
|
|
|
|
find_package(hdf5 CONFIG REQUIRED)
|
2024-03-12 11:15:52 +08:00
|
|
|
find_package(unofficial-liblzf CONFIG REQUIRED)
|
2020-05-14 07:59:31 +08:00
|
|
|
|
2024-03-12 11:15:52 +08:00
|
|
|
add_library(h5py-lzf STATIC lzf_filter.c)
|
2020-05-14 07:59:31 +08:00
|
|
|
target_include_directories(h5py-lzf PUBLIC $<INSTALL_INTERFACE:include>)
|
2024-03-12 11:15:52 +08:00
|
|
|
target_link_libraries(h5py-lzf PRIVATE
|
|
|
|
unofficial::liblzf::liblzf
|
|
|
|
$<IF:$<TARGET_EXISTS:hdf5::hdf5-shared>,hdf5::hdf5-shared,hdf5::hdf5-static>
|
|
|
|
)
|
|
|
|
|
|
|
|
install(FILES lzf_filter.h DESTINATION include)
|
|
|
|
install(TARGETS h5py-lzf
|
|
|
|
EXPORT unofficial-h5py-lzf-targets
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
)
|
|
|
|
install(EXPORT unofficial-h5py-lzf-targets
|
|
|
|
NAMESPACE unofficial::h5py-lzf::
|
|
|
|
DESTINATION share/unofficial-h5py-lzf
|
|
|
|
)
|