diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-10-11 15:13:15 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-10-11 15:13:15 (GMT) |
commit | 2f2790350573f80b62714bc4cbdc288a3d6f8ccc (patch) | |
tree | 8488505c765e09edea75bac3dfb7e4a0f48d714e /CMakeLists.txt | |
parent | 0e617633fc7902a4e954b869b10088871c226aec (diff) | |
download | hdf5-2f2790350573f80b62714bc4cbdc288a3d6f8ccc.zip hdf5-2f2790350573f80b62714bc4cbdc288a3d6f8ccc.tar.gz hdf5-2f2790350573f80b62714bc4cbdc288a3d6f8ccc.tar.bz2 |
[svn-r19571] Parameterize SVN URLs.
Add ExternalProject dependicies of external libs copy on project build.
Force ExternalProject Libs to build release.
Tested: local linux
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a79eecb..0c84dc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -447,6 +447,14 @@ HDF5_SETUP_FILTERS (SCALEOFFSET) INCLUDE (ExternalProject) OPTION (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building" "NO") +IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") + IF (NOT ZLIB_SVN_URL) + SET (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk") + ENDIF (NOT ZLIB_SVN_URL) + IF (NOT SZIP_SVN_URL) + SET (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk") + ENDIF (NOT SZIP_SVN_URL) +ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") #----------------------------------------------------------------------------- # Option for ZLib support @@ -463,10 +471,11 @@ IF (HDF5_ENABLE_Z_LIB_SUPPORT) ELSE (ZLIB_FOUND) IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") EXTERNALPROJECT_ADD (ZLIB - SVN_REPOSITORY http://svn.hdfgroup.uiuc.edu/zlib/trunk + SVN_REPOSITORY ${ZLIB_SVN_URL} # [SVN_REVISION rev] INSTALL_COMMAND "" CMAKE_ARGS + -DBLDTYPE:STRING="Release" -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} ) EXTERNALPROJECT_GET_PROPERTY (ZLIB BINARY_DIR SOURCE_DIR) @@ -523,10 +532,11 @@ IF (HDF5_ENABLE_SZIP_SUPPORT) ELSE (SZIP_FOUND) IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") EXTERNALPROJECT_ADD (SZIP - SVN_REPOSITORY http://svn.hdfgroup.uiuc.edu/szip/trunk + SVN_REPOSITORY ${SZIP_SVN_URL} # [SVN_REVISION rev] INSTALL_COMMAND "" CMAKE_ARGS + -DBLDTYPE:STRING="Release" -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} -DSZIP_ENABLE_ENCODING:BOOL=${HDF5_ENABLE_SZIP_ENCODING} ) @@ -584,6 +594,9 @@ IF (WIN32 AND NOT CYGWIN) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/ COMMENT "Copying ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/" ) + IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") + ADD_DEPENDENCIES (${ZLIB-Release-Copy} ZLIB) + ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) @@ -595,6 +608,9 @@ IF (WIN32 AND NOT CYGWIN) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/ COMMENT "Copying ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/" ) + IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") + ADD_DEPENDENCIES (${SZIP-Release-Copy} SZIP) + ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) ENDIF (BUILD_SHARED_LIBS) @@ -627,12 +643,12 @@ ENDIF (HDF5_USE_H5DUMP_PACKED_BITS) ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src) IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") - IF (ZLIB_FOUND) + IF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) ADD_DEPENDENCIES (${HDF5_LIB_TARGET} ZLIB) - ENDIF (ZLIB_FOUND) - IF (SZIP_FOUND) + ENDIF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) + IF (SZIP_FOUND AND SZIP_USE_EXTERNAL) ADD_DEPENDENCIES (${HDF5_LIB_TARGET} SZIP) - ENDIF (SZIP_FOUND) + ENDIF (SZIP_FOUND AND SZIP_USE_EXTERNAL) ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") #----------------------------------------------------------------------------- |