aboutsummaryrefslogtreecommitdiff
path: root/ports/ismrmrd/fix-depends-hdf5.patch
blob: 26b01de48f4e7efc567503c17e289dd6d9a6a4d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2144fd3..68f9ca9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -108,7 +108,11 @@ endif()
 if (USE_HDF5_DATASET_SUPPORT)
     if (VCPKG_TARGET_TRIPLET) #VCPKG HDF5 is packaged differently.
         find_package(HDF5 CONFIG COMPONENTS C shared REQUIRED)
-        set(HDF5_C_LIBRARIES hdf5::hdf5-shared)
+        if (BUILD_SHARED_LIBS)
+            set(HDF5_C_LIBRARIES hdf5::hdf5-shared)
+        else()
+            set(HDF5_C_LIBRARIES hdf5::hdf5-static)
+        endif()
     else ()
         find_package(HDF5 COMPONENTS C REQUIRED)
     endif ()