2023-01-20 09:55:56 +08:00
|
|
|
find_package(hdf5 CONFIG REQUIRED)
|
|
|
|
if(NOT TARGET hdf5::hdf5 AND (TARGET hdf5::hdf5-static OR TARGET hdf5::hdf5-shared))
|
|
|
|
add_library(hdf5::hdf5 INTERFACE IMPORTED)
|
|
|
|
if(TARGET hdf5::hdf5-shared)
|
|
|
|
target_link_libraries(hdf5::hdf5 INTERFACE hdf5::hdf5-shared)
|
|
|
|
elseif(TARGET hdf5::hdf5-static)
|
|
|
|
target_link_libraries(hdf5::hdf5 INTERFACE hdf5::hdf5-static)
|
|
|
|
endif()
|
2020-05-12 04:39:50 +08:00
|
|
|
endif()
|
2023-01-20 09:55:56 +08:00
|
|
|
|
|
|
|
if(NOT TARGET hdf5::hdf5_hl AND (TARGET hdf5::hdf5_hl-static OR TARGET hdf5::hdf5_hl-shared))
|
|
|
|
add_library(hdf5::hdf5_hl INTERFACE IMPORTED)
|
|
|
|
if(TARGET hdf5::hdf5_hl-shared)
|
|
|
|
target_link_libraries(hdf5::hdf5_hl INTERFACE hdf5::hdf5_hl-shared)
|
|
|
|
elseif(TARGET hdf5::hdf5_hl-static)
|
|
|
|
target_link_libraries(hdf5::hdf5_hl INTERFACE hdf5::hdf5_hl-static)
|
|
|
|
endif()
|
2020-05-12 04:39:50 +08:00
|
|
|
endif()
|
2023-01-20 09:55:56 +08:00
|
|
|
|
|
|
|
set(HDF5_IS_PARALLEL "${HDF5_ENABLE_PARALLEL}" CACHE BOOL "" FORCE)
|
2020-05-12 04:39:50 +08:00
|
|
|
set(HDF5_FOUND ON CACHE BOOL "" FORCE)
|
|
|
|
set(hdf5_FOUND ON CACHE BOOL "" FORCE)
|