Hi,
I’m trying to use HDF5 as an external project while CMake superbuild (inside Slicer 3D application). My test project where you can see the CMake files is located here.
The problem is that after CMake builds HDF5 I cannot perform find_package(hdf5 REQUIRED)
. This command gives me error:
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