CMake Warning (dev) at C:/Qt/Tools/CMake_64/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:424 (message): The package name passed to find_package_handle_standard_args (HDF5) does not match the name of the calling package (hdf5). This can lead to problems in calling code that expects find_package result variables
_(e.g., FOUND) to follow a certain pattern. Call Stack (most recent call first): C:/Qt/Tools/CMake_64/share/cmake-3.19/Modules/FindHDF5.cmake:975 (find_package_handle_standard_args) C:/S/d/VTK/CMake/FindHDF5.cmake:9 (include) KKK/CMakeLists.txt:10 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.
– Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found version “”)
If I change lower case find_package(hdf5 REQUIRED) to upper case find_package(HDF5 REQUIRED) then I get the following error:
CMake Error at C:/Qt/Tools/CMake_64/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
_ Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found_
_ version “”)_
I need help to overcome this problem
Windows 10 x64, MSVC 2019 x64, HDF5 git-tag hdf5-1_12_0 and hdf-1_10_7, CMAKE 3.13.4
I think the main reason is that hdf5-config.cmake stores wrong information about where hdf5 is located.
The command find_package(hdf5 REQUIRED CONFIG) gives me error: CMake Error at C:/S/extensions/Proba_fixed/Proba-build/hdf5-build/hdf5-config.cmake:25 (message): File or directory C:/S/extensions/Proba_fixed/bin referenced by variable HDF5_TOOLS_DIR does not exist !
But hdf5 is build in here C:\S\extensions\Proba_fixed\Proba-build and the bin folder lives there: C:\S\extensions\Proba_fixed\Proba-build\bin
Could you try a development build of hdf5, a recent change moved where the hdf5-config files are located on windows. Any of the branches from git should be sufficient for the test.
I’m trying to build dev branch but whenI build it I always get the error: fatal error C1083: Cannot open include file: ‘H5version.h’: No such file or directory
It seems that after I downloaded Perl the HDF5-dev build is fine.
But I still get error when I try to compile HDF5 as an external package:
File or directory C:/S/extensions/bin referenced by variable HDF5_TOOLS_DIR does not exist !
It is strange that it used to be C:/S/extensions/Proba_fixed/bin but now the path is C:/S/extensions/bin
In my ExternalProject_Add(...) I have: GIT_REPOSITORY "git://github.com/HDFGroup/hdf5.git" GIT_TAG "develop"
I think that is correct to force CMake to build HDF5-dev branch?
You should be right. I think the problem is that hdf5-config.cmake is located in wrong directory (it is in C:/.../hdf5-build dir).
I just tried to move this file two folders down (in C:/.../hdf5-build/src/CMakeFiles dir) and the command find_package(hdf5 REQUIRED CONFIG PATHS "C:/S/extensions/Proba_fixed/Proba-build/hdf5-build/src") didn’t give me the mentionned error but I got another one: CMake Error at C:/S/extensions/Proba_fixed/Proba-build/hdf5-build/src/CMakeFiles/hdf5-config.cmake:144 (include): include could not find load file: C:/S/extensions/Proba_fixed/Proba-build/share/cmake/hdf5/hdf5-targets.cmake