cmake_minimum_required (VERSION 3.1.0)
#-----------------------------------------------------------------------------
# Instructions for use : Normal Build
# For standard build of HDF5 libraries,tests and tools.
# Run cmake using the HDF5 source tree to generate a build tree.
# Enable/Disable options according to requirements and
# set CMAKE_INSTALL_PREFIX to the required install path.
# Make install can be used to install all components for system-wide use.
if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
MESSAGE(FATAL_ERROR "\nERROR! ${PROJECT_NAME} DOES NOT SUPPORT IN SOURCE BUILDS!\n"
"CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
" == CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}\n"
"(1) Delete the CMakeCache.txt file and the CMakeFiles/ directory\n"
" under the source directory for ${PROJECT_NAME}, otherwise you\n"
" will not be able to configure ${PROJECT_NAME} correctly!\n"
" * For example, on linux machines do:\n"
" $ rm -r CMakeCache.txt CMakeFiles/\n"
"(2) Create a different directory and configure ${PROJECT_NAME} in that directory.\n"
" * For example, on linux machines do:\n"
" $ cmake [OPTIONS] ..\n"
#-----------------------------------------------------------------------------
# Instructions for use : Sub-Project Build
# To include HDF5 as a sub-project within another project.
# Set HDF5_EXTERNALLY_CONFIGURED to 1 in the parent project and
# supply values for the following variables...
# HDF5_EXPORTED_TARGETS :
# Set this to the name of the targets variable which controls exports
# If unset (because parent project does not support/use the
# install (EXPORT target...) syntax), then targets are not configured
# for export during install.
# HDF5_LIB_DEPENDENCIES :
# If the build of HDF5 libs is being customized, then rules for the
# dependencies of the HDF5 libs may be 'incomplete', add additional
# dependencies to this variable so that external projects pick them up
# HDF5_EXTERNAL_LIB_PREFIX :
# If the parent project needs to install hdf libraries, but avoid
# name conflicts with system versions, then a prefix may be added