From e6aeb69bc63031b59fc6910b1833e56fafd7bed8 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Fri, 29 Mar 2024 15:11:49 +0100 Subject: [PATCH] Apply vcpkg patch --- cmake/thirdParties.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmake/thirdParties.cmake b/cmake/thirdParties.cmake index 4d0b4846..82751514 100644 --- a/cmake/thirdParties.cmake +++ b/cmake/thirdParties.cmake @@ -60,10 +60,13 @@ if(HDF5_FOUND) elseif(TARGET hdf5) # target from hdf5 1.8 config target_link_libraries(MATIO::HDF5 INTERFACE hdf5) - elseif(TARGET HDF5::HDF5) + elseif(TARGET hdf5::hdf5-shared) # target defined in CMake FindHDF5 (since 3.19) - target_link_libraries(MATIO::HDF5 INTERFACE HDF5::HDF5) - else() + target_link_libraries(MATIO::HDF5 INTERFACE hdf5::hdf5-shared) + elseif(TARGET hdf5::hdf5-static) + # target defined in CMake FindHDF5 (since 3.19) + target_link_libraries(MATIO::HDF5 INTERFACE hdf5-static) + else() # results from CMake FindHDF5 set_target_properties(MATIO::HDF5 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HDF5_INCLUDE_DIRS}"