Set the HDF5_DIR environment variable to the location of the CMake files in the built HDF5 binary distribution. They are located in the
share/cmake/hdf5/ directory on Unix and in the
cmake directory on Windows.
- You can set the HDF5_DIR environment variable within a CMake application:
set(ENV $HDF5_DIR <mypath>/HDF5-1.N.N-Linux/HDF_Group/HDF5/1.N.N/share/cmake/hdf5)
- Alternately, set HDF5_DIR as you would other environment variables:
The HDF5-1.N.N-Linux.tar.gz file is created in the CMake-hdf5-1.N.N directory when HDF5 is built on Linux with CMake. Uncompress the file. It contains the
share/cmake/hdf5/ directory. From a command line, set the HDF5_DIR environment variable to the location of this directory:
setenv HDF5_DIR <mypath>/HDF5-1.N.N-Linux/HDF_Group/HDF5/1.N.N/share/cmake/hdf5)
The HDF5-1.N.N-win64.zip is created in the CMake-hdf5-1.N.N directory when HDF5 is built on Windows 64-bit. Uncompress the file. It contains a directory with cmake files in
cmake\hdf5. Set the HDF5_DIR environment variable to the location of this directory.
Setting an Environment Variable on Windows 7:
Left click on Start at the bottom left and then right-click on Computer and select Properties from the menu that pops up. The Control Panel Home window opens. Select "Advanced system settings" on the left to bring up the "System Properties". Select the "Environment Variables" button near the bottom, from which you can add User and System variables.
Create a source
directory for the build script and application