I want to use the HDF5 libraries in my C++ program. I am using the VS 2010 x64 compiler and CMake 3.8.0rc2 on Windows 7. The HDF5 version I installed is 1.8.10 (installed by running the official "Installer").
In my CMakeLists file, I added the following lines:
FIND_PACKAGE ( HDF5 REQUIRED )
INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIRS})
SET (HDF5_LIBS ${HDF5_LIBS} ${HDF5_LIBRARIES})
...
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} ${HDF5_LIBS})
CMake shows the following error message upon Configuring:
Could NOT find HDF5 (missing: HDF5_LIBRARIES)
I also added the environment variables HDF5_DIR
and HDF5_ROOT
which both point to my HDF5 installation folder C:\Develop\HDF5\1.8.10
.
What am I missing to have CMake recognize the HDF5 installation?