vcpkg/ports/h5py-lzf/CMakeLists.txt
Kai Pastor c8f2fabe95
[vcpkg baseline][h5py-lzf] Update, use liblzf port, fix export, cleanup (#37332)
Stop using vendored liblzf in h5py-lzf, fixing `lzf.h` install conflict.
Alternative to https://github.com/microsoft/vcpkg/pull/37240.
2024-03-11 20:15:52 -07:00

24 lines
715 B
CMake

cmake_minimum_required(VERSION 3.13)
project(h5py-lzf LANGUAGES C)
find_package(hdf5 CONFIG REQUIRED)
find_package(unofficial-liblzf CONFIG REQUIRED)
add_library(h5py-lzf STATIC lzf_filter.c)
target_include_directories(h5py-lzf PUBLIC $<INSTALL_INTERFACE:include>)
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
)