cmake resolution for finding HDF5 (part of the netcdf pkg)
I've been trying to compile a very recent git: v2.9.0-202-g64b8b784 of ovito for a client on our cluster. I've installed the bazillion dependencies and to my knowledge they're all up to date, including the most recent netcdf-c (4.6.1) and HDF5 (1.8.20) to meet the required dependency tree. However when trying to use the cmake command:
cmake -DOVITO_BUILD_DOCUMENTATION=OFF \
-DCMAKE_INSTALL_PREFIX=/data/apps/ovito/2.9.0-202 \
-DCMAKE_BUILD_TYPE=Release \
-DNETCDF_LIBRARY=/data/apps/netcdf-c/4.6.1/lib/libnetcdf.so \
-DNETCDF_INCLUDE_DIR=/data/apps/netcdf-c/4.6.1/include \
-DPYTHON_EXECUTABLE=/data/apps/python/2.7.15/bin/python \
-DPYTHON_INCLUDE_DIR=/data/apps/python/2.7.15/include \
-DPYTHON_LIBRARY=/data/apps/python/2.7.15/lib/libpython2.7.so\
-DQSCINTILLA_LIBRARY=/data/apps/qt/5.4.2/lib/libqscintilla2_qt5.so \
-DQSCINTILLA_INCLUDE_DIR=/data/apps/qt/5.4.2/include \
-DFFTW3_LIBRARY=/data/apps/fftw/3.3.4-no-mpi/lib/libfftw3f_omp.so \
-DLIBSSH_LIBRARY=/data/apps/libssh2/1.8.0/libssh2.so \
-DLIBSSH_INCLUDE_DIR=/usr/include \
-DCMAKE_PREFIX_PATH=/data/apps/hdf5/1.8.20 \
..
it fails with:
... -- Detecting CXX compile features - done -- Found Git: /data/apps/git/2.16.1/bin/git (found version "2.16.1") CMAKE_MODULE_PATH=/data/apps/sources/ovito/cmake CMAKE_PREFIX_PATH=/data/apps/hdf5/1.8.20 -- Boost version: 1.63.0 CMake Error at src/3rdparty/netcdf_integration/CMakeLists.txt:31 (FIND_PACKAGE): Could not find a package configuration file provided by "HDF5" with any of the following names:
HDF5Config.cmake hdf5-config.cmake
Add the installation prefix of "HDF5" to CMAKE_PREFIX_PATH or set "HDF5_DIR" to a directory containing one of the above files. If "HDF5" provides a separate development package or SDK, be sure it has been installed.
None of our HDF5 installation or source trees have those files in them (we have hdf5/1.8.11, hdf5/1.8.13, hdf5/1.8.14, hdf5/1.8.17, & hdf5/1.8.20) and most of the source trees. This file (HDF5Config.cmake) is referenced in HDF5 pages, but they seem to be only available in the CMAKE distribution of HDF5 (CMake-hdf5-1.8.20.tar.gz) and we've always used the configure distribution since it works so much more smoothly. Does this mean I have to DL and use cmake to recompile yet another version of HDF5 simply to satisfy cmake? Is there no way to simply point cmake to our current and perfectly good installation of HDF5?
Strangely enough, the git version of last Thursday completed the cmake sequence and finally allowed me to start compiling ,but then failed bc the makefile couldn't find the new libssh2 which I had just installed (and the cmake sequence both found AND compiled on a previous section.) It did NOT complain about not being able to find the HDF5 installation at all.
I very much appreciate your efforts and this appears to be a valuable tool, but every time I have to use cmake, it's like driving a 10penny nail thru my eye.
hjm