diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 41cae3c..22b0f1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -446,6 +446,8 @@ HDF5_SETUP_FILTERS (SCALEOFFSET) INCLUDE (ExternalProject) OPTION (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building" "NO") IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") + SET (ZLIB_USE_EXTERNAL 1) + SET (SZIP_USE_EXTERNAL 1) IF (NOT ZLIB_SVN_URL) SET (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk") ENDIF (NOT ZLIB_SVN_URL) @@ -460,7 +462,9 @@ ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") OPTION (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF) IF (HDF5_ENABLE_Z_LIB_SUPPORT) IF (NOT H5_ZLIB_HEADER) - FIND_PACKAGE (ZLIB) + IF (NOT ZLIB_USE_EXTERNAL) + FIND_PACKAGE (ZLIB) + ENDIF (NOT ZLIB_USE_EXTERNAL) IF (ZLIB_FOUND) SET (H5_HAVE_FILTER_DEFLATE 1) SET (H5_HAVE_ZLIB_H 1) @@ -535,7 +539,9 @@ SET (CMAKE_MODULE_PATH ${HDF5_RESOURCES_DIR} ${CMAKE_MODULE_PATH}) OPTION (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF) IF (HDF5_ENABLE_SZIP_SUPPORT) OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF) - FIND_PACKAGE (SZIP) + IF (NOT SZIP_USE_EXTERNAL) + FIND_PACKAGE (SZIP) + ENDIF (NOT SZIP_USE_EXTERNAL) IF (SZIP_FOUND) SET (H5_HAVE_FILTER_SZIP 1) SET (H5_HAVE_SZLIB_H 1) |