summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 17 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e688ed..340c4ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -159,8 +159,10 @@ ENDIF (NOT HDF5_INSTALL_INCLUDE_DIR)
IF (NOT HDF5_INSTALL_DATA_DIR)
IF (NOT WIN32)
SET (HDF5_INSTALL_DATA_DIR share)
+ SET (HDF5_INSTALL_CMAKE_DIR share/cmake)
ELSE (NOT WIN32)
SET (HDF5_INSTALL_DATA_DIR ".")
+ SET (HDF5_INSTALL_CMAKE_DIR cmake)
ENDIF (NOT WIN32)
ENDIF (NOT HDF5_INSTALL_DATA_DIR)
@@ -174,7 +176,7 @@ STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$"
"\\1" H5_VERS_MINOR ${_h5public_h_contents})
STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$"
"\\1" H5_VERS_RELEASE ${_h5public_h_contents})
-STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z.]*)\".*$"
+STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._]*)\".*$"
"\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents})
#MESSAGE (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
@@ -465,7 +467,7 @@ ENDIF (CMAKE_COMPILER_IS_GNUCXX)
#-----------------------------------------------------------------------------
# All libs/tests/examples need the main include directories
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR})
+INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
#-----------------------------------------------------------------------------
# Option to Enable MPI Parallel
@@ -561,6 +563,9 @@ IF (HDF5_ENABLE_Z_LIB_SUPPORT)
IF (NOT H5_ZLIB_HEADER)
IF (NOT ZLIB_USE_EXTERNAL)
FIND_PACKAGE (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
+ IF (NOT ZLIB_FOUND)
+ FIND_PACKAGE (ZLIB) # Legacy find
+ ENDIF (NOT ZLIB_FOUND)
ENDIF (NOT ZLIB_USE_EXTERNAL)
IF (ZLIB_FOUND)
SET (H5_HAVE_FILTER_DEFLATE 1)
@@ -568,6 +573,7 @@ IF (HDF5_ENABLE_Z_LIB_SUPPORT)
SET (H5_HAVE_LIBZ 1)
SET (H5_ZLIB_HEADER "zlib.h")
SET (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
+ SET (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
ELSE (ZLIB_FOUND)
IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE})
@@ -601,12 +607,16 @@ IF (HDF5_ENABLE_SZIP_SUPPORT)
OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
IF (NOT SZIP_USE_EXTERNAL)
FIND_PACKAGE (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
+ IF (NOT SZIP_FOUND)
+ FIND_PACKAGE (SZIP) # Legacy find
+ ENDIF (NOT SZIP_FOUND)
ENDIF (NOT SZIP_USE_EXTERNAL)
IF (SZIP_FOUND)
SET (H5_HAVE_FILTER_SZIP 1)
SET (H5_HAVE_SZLIB_H 1)
SET (H5_HAVE_LIBSZ 1)
SET (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
+ SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
ELSE (SZIP_FOUND)
IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING})
@@ -835,7 +845,7 @@ ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
IF (NOT HDF5_EXTERNALLY_CONFIGURED)
INSTALL (
EXPORT ${HDF5_EXPORTED_TARGETS}
- DESTINATION ${HDF5_INSTALL_DATA_DIR}/cmake/${HDF5_PACKAGE}
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
COMPONENT configinstall
)
@@ -877,7 +887,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
)
INSTALL (
FILES ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake
- DESTINATION ${HDF5_INSTALL_DATA_DIR}/cmake/${HDF5_PACKAGE}
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
COMPONENT configinstall
)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
@@ -892,7 +902,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
)
INSTALL (
FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
- DESTINATION ${HDF5_INSTALL_DATA_DIR}/cmake/${HDF5_PACKAGE}
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
COMPONENT configinstall
)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
@@ -907,7 +917,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
)
INSTALL (
FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF5_PACKAGE_EXT}-config-version.cmake
- DESTINATION ${HDF5_INSTALL_DATA_DIR}/cmake/${HDF5_PACKAGE}
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
COMPONENT configinstall
)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
@@ -926,7 +936,7 @@ CONFIGURE_FILE (
)
INSTALL (
FILES ${HDF5_BINARY_DIR}/libhdf5.settings
- DESTINATION ${HDF5_INSTALL_DATA_DIR}/cmake/${HDF5_PACKAGE}
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
COMPONENT libraries
)