Page tree

The license could not be verified: License Certificate has expired!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

Unix:

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)

Windows 64-bit:

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\

...

. 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 sourcedirectory for the build script and application

...

Change the script (optional)

You NOTE that you can change the script to include the HDF5_DIR environment variable. For example add this after line 3 in the script:

set ( ENV {HDF5_DIR} c:/Program Files/HDF_Group/1.10.5/cmake/hdf5/ )

Also note that if you have multiple versions of HDF5 on your machine, then you must specify the HDF5 version with in the find_package call:

find_package (HDF5 1.10.5 NAMES "hdf5" COMPONENTS ${FIND_HDF_COMPONENTS})

...