summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-08-09 14:46:15 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-08-09 14:46:15 (GMT)
commitfcdc7614d7bc66e2715871b521a9bb577d49af48 (patch)
treebfcbf227f7422cfd8eb24b05975594413f8b95ba
parent88a94bbe7ffa3c0bb7779d1b16989b385d9eadd2 (diff)
downloadhdf5-fcdc7614d7bc66e2715871b521a9bb577d49af48.zip
hdf5-fcdc7614d7bc66e2715871b521a9bb577d49af48.tar.gz
hdf5-fcdc7614d7bc66e2715871b521a9bb577d49af48.tar.bz2
[svn-r22650] Allow second find_package call for legacy libraries (not cmake-configured)
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf7c305..d43b3ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -563,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)
@@ -570,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})
@@ -603,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})