diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2011-04-04 04:35:33 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2011-04-04 04:35:33 (GMT) |
commit | d6ecc0d44841cc7248b5eb36c20c3a7e7b33b9e6 (patch) | |
tree | b579914f65ecd6652ba7f7be74b25881672f7f41 /CMakeLists.txt | |
parent | f4e7559bd2d8bbd59535cbcafab78e162a6bffb6 (diff) | |
download | hdf5-d6ecc0d44841cc7248b5eb36c20c3a7e7b33b9e6.zip hdf5-d6ecc0d44841cc7248b5eb36c20c3a7e7b33b9e6.tar.gz hdf5-d6ecc0d44841cc7248b5eb36c20c3a7e7b33b9e6.tar.bz2 |
[svn-r20408] Description:
Bring r20382:20407 from trunk to revise_chunks branch.
Tested on:
Linux/32 2.6 (chicago) w/C++
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 84 |
1 files changed, 43 insertions, 41 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0dfe687..5bfabef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -546,54 +546,56 @@ ENDIF (HDF5_ENABLE_SZIP_SUPPORT) # Option for external libraries on windows #----------------------------------------------------------------------------- OPTION (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF) -IF (HDF5_PACKAGE_EXTLIBS) - SET (EXTERNAL_HEADER_LIST "") - SET (EXTERNAL_LIBRARY_LIST "") - SET (EXTERNAL_LIBRARYDLL_LIST "") - FILE (MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BLDTYPE}) - - IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) - PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) - ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) - - IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) - PACKAGE_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) - ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) -ENDIF (HDF5_PACKAGE_EXTLIBS) - -IF (WIN32 AND NOT CYGWIN) - IF (BUILD_SHARED_LIBS) +IF (NOT HDF5_EXTERNALLY_CONFIGURED) + IF (HDF5_PACKAGE_EXTLIBS) + SET (EXTERNAL_HEADER_LIST "") + SET (EXTERNAL_LIBRARY_LIST "") + SET (EXTERNAL_LIBRARYDLL_LIST "") FILE (MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BLDTYPE}) + IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) - GET_FILENAME_COMPONENT(ZLIB_DLL_NAME ${ZLIB_LIBRARY} NAME_WE) - # MESSAGE (STATUS "ZLIB_DLL_NAME: ${ZLIB_DLL_NAME}") - GET_FILENAME_COMPONENT(ZLIB_BIN_PATH ${ZLIB_LIBRARY} PATH) - # MESSAGE (STATUS "ZLIB_BIN_PATH: ${ZLIB_BIN_PATH}") - ADD_CUSTOM_TARGET (ZLIB-Release-Copy ALL - 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" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - ADD_DEPENDENCIES (ZLIB-Release-Copy ZLIB) - ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) - GET_FILENAME_COMPONENT(SZIP_DLL_NAME ${SZIP_LIBRARY} NAME_WE) - # MESSAGE (STATUS "SZIP_DLL_NAME: ${SZIP_DLL_NAME}") - GET_FILENAME_COMPONENT(SZIP_BIN_PATH ${SZIP_LIBRARY} PATH) - # MESSAGE (STATUS "SZIP_BIN_PATH: ${SZIP_BIN_PATH}") - ADD_CUSTOM_TARGET (SZIP-Release-Copy ALL - 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" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - ADD_DEPENDENCIES (SZIP-Release-Copy SZIP) - ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + PACKAGE_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) + ENDIF (HDF5_PACKAGE_EXTLIBS) + + IF (WIN32 AND NOT CYGWIN) + IF (BUILD_SHARED_LIBS) + FILE (MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BLDTYPE}) + IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) + GET_FILENAME_COMPONENT(ZLIB_DLL_NAME ${ZLIB_LIBRARY} NAME_WE) + # MESSAGE (STATUS "ZLIB_DLL_NAME: ${ZLIB_DLL_NAME}") + GET_FILENAME_COMPONENT(ZLIB_BIN_PATH ${ZLIB_LIBRARY} PATH) + # MESSAGE (STATUS "ZLIB_BIN_PATH: ${ZLIB_BIN_PATH}") + ADD_CUSTOM_TARGET (ZLIB-Release-Copy ALL + 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" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ADD_DEPENDENCIES (ZLIB-Release-Copy ZLIB) + ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) - ENDIF (BUILD_SHARED_LIBS) -ENDIF (WIN32 AND NOT CYGWIN) + IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) + GET_FILENAME_COMPONENT(SZIP_DLL_NAME ${SZIP_LIBRARY} NAME_WE) + # MESSAGE (STATUS "SZIP_DLL_NAME: ${SZIP_DLL_NAME}") + GET_FILENAME_COMPONENT(SZIP_BIN_PATH ${SZIP_LIBRARY} PATH) + # MESSAGE (STATUS "SZIP_BIN_PATH: ${SZIP_BIN_PATH}") + ADD_CUSTOM_TARGET (SZIP-Release-Copy ALL + 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" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ADD_DEPENDENCIES (SZIP-Release-Copy SZIP) + ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) + + ENDIF (BUILD_SHARED_LIBS) + ENDIF (WIN32 AND NOT CYGWIN) +ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) #----------------------------------------------------------------------------- # Option to use threadsafe |