vcpkg/ports/ecal/0003-fix-dependencies.patch
DownerCase bb77388661
[ecal] Add new port (#33296)
* [ecal] Add new port

* Fix patch typo
2023-09-26 00:24:39 -07:00

21 lines
638 B
Diff

diff --git a/contrib/ecalhdf5/CMakeLists.txt b/contrib/ecalhdf5/CMakeLists.txt
index c167bacd4..45e754340 100644
--- a/contrib/ecalhdf5/CMakeLists.txt
+++ b/contrib/ecalhdf5/CMakeLists.txt
@@ -18,9 +18,14 @@
project(hdf5 LANGUAGES C CXX)
-if(NOT CMAKE_CROSSCOMPILING)
+if(1)
find_package(HDF5 COMPONENTS C REQUIRED)
find_package(Threads REQUIRED)
+ if (TARGET hdf5::hdf5-shared)
+ set(ECAL_LINK_HDF5_SHARED 1)
+ else()
+ set(ECAL_LINK_HDF5_SHARED 0)
+ endif()
else()
find_library(hdf5_path NAMES hdf5 REQUIRED PATH_SUFFIXES hdf5/serial)
find_path(hdf5_include NAMES hdf5.h PATH_SUFFIXES hdf5/serial REQUIRED)