diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2014-01-24 19:35:58 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2014-01-24 19:35:58 (GMT) |
commit | 63df298fcc51d1020a2198a4f9d6c2e0b95ea543 (patch) | |
tree | fb6d1adc6deb592d6a29bc9d3af3f5dcabed5e0b | |
parent | 25b90a558c1cd42dff4e8f65f7d0769f47d823ff (diff) | |
download | hdf5-63df298fcc51d1020a2198a4f9d6c2e0b95ea543.zip hdf5-63df298fcc51d1020a2198a4f9d6c2e0b95ea543.tar.gz hdf5-63df298fcc51d1020a2198a4f9d6c2e0b95ea543.tar.bz2 |
[svn-r24641] Handle szip lib like zlib lib
-rw-r--r-- | CMakeFilters.cmake | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index bc78fa6..cfde3c9 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -86,29 +86,36 @@ ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT) OPTION (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF) 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}) + IF (NOT H5_SZLIB_HEADER) + 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) - MESSAGE (STATUS "Filter SZIP is built") - ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - MESSAGE (FATAL_ERROR "SZIP is Required for SZIP support in HDF5") - ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - ENDIF (SZIP_FOUND) + SET (H5_SZLIB_HEADER "szlib.h") + 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}) + SET (H5_HAVE_FILTER_SZIP 1) + SET (H5_HAVE_SZLIB_H 1) + SET (H5_HAVE_LIBSZ 1) + MESSAGE (STATUS "Filter SZIP is built") + ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + MESSAGE (FATAL_ERROR "SZIP is Required for SZIP support in HDF5") + ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ENDIF (SZIP_FOUND) + ELSE (NOT H5_SZLIB_HEADER) + SET (H5_HAVE_FILTER_SZIP 1) + SET (H5_HAVE_SZLIB_H 1) + SET (H5_HAVE_LIBSZ 1) + ENDIF (NOT H5_SZLIB_HEADER) SET (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES}) INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIR}) MESSAGE (STATUS "Filter SZIP is ON") |