2014-04-26 05:27:37 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
2014-09-25 22:37:09 +08:00
|
|
|
# HDF5 Config file for compiling against hdf5 build/install directory
|
2014-04-26 05:27:37 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
2014-09-25 22:37:09 +08:00
|
|
|
@PACKAGE_INIT@
|
2014-04-26 05:27:37 +08:00
|
|
|
|
2015-03-24 03:45:58 +08:00
|
|
|
string(TOUPPER @HDF5_PACKAGE@ HDF5_PACKAGE_NAME)
|
|
|
|
|
2015-03-26 06:08:46 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_VALID_COMPONENTS
|
2015-08-06 05:01:07 +08:00
|
|
|
static
|
|
|
|
shared
|
2015-03-26 06:08:46 +08:00
|
|
|
C
|
|
|
|
CXX
|
|
|
|
Fortran
|
|
|
|
HL
|
|
|
|
CXX_HL
|
|
|
|
Fortran_HL
|
2016-02-29 10:43:00 +08:00
|
|
|
Java
|
2015-03-26 06:08:46 +08:00
|
|
|
Tools
|
|
|
|
)
|
|
|
|
|
2014-04-26 05:27:37 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# User Options
|
|
|
|
#-----------------------------------------------------------------------------
|
2015-03-19 05:17:59 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
|
2016-02-29 10:43:00 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_BUILD_JAVA @HDF5_BUILD_JAVA@)
|
2015-03-19 05:17:59 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
|
2015-03-26 06:08:46 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES @HDF5_LIBRARIES_TO_EXPORT@)
|
2014-04-26 05:27:37 +08:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Dependencies
|
|
|
|
#-----------------------------------------------------------------------------
|
2015-03-19 05:17:59 +08:00
|
|
|
if (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_PATH@")
|
|
|
|
set (${HDF5_PACKAGE_NAME}_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@")
|
|
|
|
endif ()
|
2014-04-26 05:27:37 +08:00
|
|
|
|
2016-02-29 10:43:00 +08:00
|
|
|
if (${HDF5_PACKAGE_NAME}_BUILD_JAVA)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_JAVA_INCLUDE_DIRS
|
|
|
|
@PACKAGE_CURRENT_BUILD_DIR@/lib/jarhdf5-@HDF5_VERSION_STRING@.jar
|
|
|
|
@PACKAGE_CURRENT_BUILD_DIR@/lib/slf4j-api-1.7.5.jar
|
|
|
|
@PACKAGE_CURRENT_BUILD_DIR@/lib/slf4j-nop-1.7.5.jar
|
|
|
|
)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_JAVA_LIBRARY "@PACKAGE_CURRENT_BUILD_DIR@/lib")
|
|
|
|
set (${HDF5_PACKAGE_NAME}_JAVA_LIBRARIES "${${HDF5_PACKAGE_NAME}_JAVA_LIBRARY}")
|
|
|
|
endif()
|
|
|
|
|
2014-04-26 05:27:37 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Directories
|
|
|
|
#-----------------------------------------------------------------------------
|
2015-03-27 22:38:13 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@" "${${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_PATH}")
|
2014-09-25 22:37:09 +08:00
|
|
|
|
2015-03-19 05:17:59 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_SHARE_DIR "@PACKAGE_SHARE_INSTALL_DIR@")
|
|
|
|
set_and_check (${HDF5_PACKAGE_NAME}_BUILD_DIR "@PACKAGE_CURRENT_BUILD_DIR@")
|
2014-04-26 05:27:37 +08:00
|
|
|
|
2015-03-19 05:17:59 +08:00
|
|
|
if (${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB)
|
2015-03-27 22:38:13 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_CPP "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
2015-03-19 05:17:59 +08:00
|
|
|
endif ()
|
2014-04-26 05:27:37 +08:00
|
|
|
|
2015-03-19 05:17:59 +08:00
|
|
|
if (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB)
|
2015-03-27 22:38:13 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_HL "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
2015-03-19 05:17:59 +08:00
|
|
|
endif ()
|
2014-04-26 05:27:37 +08:00
|
|
|
|
2015-03-19 05:17:59 +08:00
|
|
|
if (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB AND ${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB)
|
2015-03-27 22:38:13 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_HL_CPP "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
2015-03-19 05:17:59 +08:00
|
|
|
endif ()
|
2014-04-26 05:27:37 +08:00
|
|
|
|
2015-03-19 05:17:59 +08:00
|
|
|
if (${HDF5_PACKAGE_NAME}_BUILD_TOOLS)
|
2015-03-27 22:38:13 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_TOOLS "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
|
|
|
set_and_check (${HDF5_PACKAGE_NAME}_TOOLS_DIR "@PACKAGE_CURRENT_BUILD_DIR@/bin")
|
2015-03-19 05:17:59 +08:00
|
|
|
endif ()
|
2014-04-26 05:27:37 +08:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Version Strings
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
set (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
|
|
|
|
set (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
|
|
|
|
set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Don't include targets if this file is being picked up by another
|
|
|
|
# project which has already built hdf5 as a subproject
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
if (NOT TARGET "@HDF5_PACKAGE@")
|
2015-03-19 05:17:59 +08:00
|
|
|
if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
|
|
|
|
include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
|
|
|
|
endif ()
|
|
|
|
if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip")
|
|
|
|
include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
|
|
|
|
endif ()
|
2014-10-17 23:09:52 +08:00
|
|
|
include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
|
2015-03-19 05:17:59 +08:00
|
|
|
endif ()
|
2014-04-26 05:27:37 +08:00
|
|
|
|
2015-08-06 05:01:07 +08:00
|
|
|
# Handle default component(static) :
|
2015-03-26 06:08:46 +08:00
|
|
|
if (NOT ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
|
2015-08-06 05:01:07 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_LIB_TYPE)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_FIND_COMPONENTS C HL static)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_FIND_REQUIRED_static_C true)
|
2015-03-26 06:08:46 +08:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
# Handle requested components:
|
|
|
|
list (REMOVE_DUPLICATES ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
|
2015-08-06 05:01:07 +08:00
|
|
|
foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
|
|
|
|
if (${comp} STREQUAL "shared")
|
|
|
|
list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp})
|
|
|
|
set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp})
|
2015-09-09 22:58:44 +08:00
|
|
|
|
|
|
|
if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_FORTRAN "@PACKAGE_INCLUDE_INSTALL_DIR@/shared")
|
|
|
|
endif ()
|
2015-08-06 05:01:07 +08:00
|
|
|
elseif (${comp} STREQUAL "static")
|
|
|
|
list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp})
|
|
|
|
set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp})
|
2015-09-09 22:58:44 +08:00
|
|
|
|
|
|
|
if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN)
|
|
|
|
set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_FORTRAN "@PACKAGE_INCLUDE_INSTALL_DIR@/static")
|
|
|
|
endif ()
|
2015-08-06 05:01:07 +08:00
|
|
|
endif ()
|
|
|
|
endforeach ()
|
|
|
|
foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE)
|
2015-03-26 06:08:46 +08:00
|
|
|
foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
|
|
|
|
set (hdf5_comp2)
|
2015-04-21 05:04:33 +08:00
|
|
|
if (${comp} STREQUAL "C")
|
2015-03-26 06:08:46 +08:00
|
|
|
set (hdf5_comp "hdf5")
|
2015-04-21 05:04:33 +08:00
|
|
|
elseif (${comp} STREQUAL "CXX")
|
2015-03-26 06:08:46 +08:00
|
|
|
set (hdf5_comp "hdf5_cpp")
|
2015-04-21 05:04:33 +08:00
|
|
|
elseif (${comp} STREQUAL "HL")
|
2015-03-26 06:08:46 +08:00
|
|
|
set (hdf5_comp "hdf5_hl")
|
2015-04-21 05:04:33 +08:00
|
|
|
elseif (${comp} STREQUAL "CXX_HL")
|
2015-03-26 06:08:46 +08:00
|
|
|
set (hdf5_comp "hdf5_hl_cpp")
|
2016-02-29 10:43:00 +08:00
|
|
|
elseif (${comp} STREQUAL "Java")
|
|
|
|
set (hdf5_comp "hdf5_java")
|
2015-04-21 05:04:33 +08:00
|
|
|
elseif (${comp} STREQUAL "Tools")
|
2015-03-26 06:08:46 +08:00
|
|
|
set (hdf5_comp "hdf5_tools")
|
2015-04-21 05:04:33 +08:00
|
|
|
elseif (${comp} STREQUAL "Fortran")
|
2015-03-26 06:08:46 +08:00
|
|
|
set (hdf5_comp2 "hdf5_f90cstub")
|
|
|
|
set (hdf5_comp "hdf5_fortran")
|
2015-04-21 05:04:33 +08:00
|
|
|
elseif (${comp} STREQUAL "Fortran_HL")
|
2015-03-26 06:08:46 +08:00
|
|
|
set (hdf5_comp2 "hdf5_hl_f90cstub")
|
|
|
|
set (hdf5_comp "hdf5_hl_fortran")
|
|
|
|
endif ()
|
2015-09-09 22:58:44 +08:00
|
|
|
list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}-${libtype}" HAVE_COMP)
|
|
|
|
if (${HAVE_COMP} LESS 0)
|
2015-08-06 05:01:07 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0)
|
2015-03-26 06:08:46 +08:00
|
|
|
else ()
|
|
|
|
if (hdf5_comp2)
|
2015-09-09 22:58:44 +08:00
|
|
|
list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp2}-${libtype}" HAVE_COMP2)
|
2015-03-26 06:08:46 +08:00
|
|
|
if (${HAVE_COMP2} LESS 0)
|
2015-08-06 05:01:07 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0)
|
2015-03-26 06:08:46 +08:00
|
|
|
else ()
|
2015-08-06 05:01:07 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1)
|
|
|
|
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)
|
|
|
|
set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf5_comp2}-${libtype} ${hdf5_comp}-${libtype})
|
2015-03-26 06:08:46 +08:00
|
|
|
endif ()
|
|
|
|
else ()
|
2015-08-06 05:01:07 +08:00
|
|
|
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1)
|
|
|
|
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)
|
|
|
|
set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf5_comp}-${libtype})
|
2015-03-26 06:08:46 +08:00
|
|
|
endif ()
|
2015-03-27 22:38:13 +08:00
|
|
|
endif ()
|
2015-03-26 06:08:46 +08:00
|
|
|
endforeach ()
|
2015-08-06 05:01:07 +08:00
|
|
|
endforeach ()
|
2015-03-26 06:08:46 +08:00
|
|
|
|
2015-08-06 05:01:07 +08:00
|
|
|
foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE)
|
|
|
|
check_required_components(${HDF5_PACKAGE_NAME}_${libtype})
|
|
|
|
endforeach ()
|