-
-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDF5 Build with Shared Libraries in MSYS2 Causing CMake Errors #5175
Comments
The HDF5 that is supposed to be found - was it built with CMake (has hd5-config*.cmake files in CMake folder) or not. |
Yes, and it works when I set |
Strange that a CMake built install only works with MODULE find and not CONFIG version. |
Here is the workflow file where I've used HDF5: |
We have one that builds but not one that tests the install. |
WOW - there is a lot going on with CMake - HDF5- libaec and find_package! First, a good to know CMake option is -DCMAKE_FIND_DEBUG_MODE:BOOL=ON which shows the process and files that CMake used to get the package info. Setting ENV{SZIP_ROOT} is all that is needed to find the package. (HDF5 does require -DSZIP_USE_EXTERNAL:BOOL=OFF and -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="NO") The next problem is that libaec doesn't set SZIP_LIBRARIES just SZIP_LIBRARY and libaec_LIBRARY. I am running into some other issues outside of the find_package. |
See #5182 for SZIP/libaec fixes against develop |
Just a note that the CMake provided FindHDF5.cmake module expects an autotools built HDF5, to find a CMake built HDF5 use find_package with the CONFIG option. |
Description
I successfully built and installed HDF5 from source with shared libraries enabled. However, when I attempt to use HDF5 in another CMake project and call
find_package(HDF5)
, CMake fails with errors related to missingIMPORTED_LOCATION
orIMPORTED_IMPLIB
properties forhdf5-shared
andhdf5_hl-shared
.Error Output
Expected Behavior
The
find_package(HDF5)
command should locate the installed HDF5 shared libraries, set up imported targets, and provide the necessary include directories and library paths.Environment
2.0.0
(built from source)3.31.2
-DBUILD_SHARED_LIBS=ON
)The text was updated successfully, but these errors were encountered: