diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-04-21 19:23:12 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-04-21 19:23:12 (GMT) |
commit | 282d1cd22459bf0d6642f6b16ea59f39663c4a76 (patch) | |
tree | b99fa322e747b96db85cce838e520411872383d5 | |
parent | af5d073a30960bb2df0b9fb572c7fafbe65902fa (diff) | |
download | hdf5-282d1cd22459bf0d6642f6b16ea59f39663c4a76.zip hdf5-282d1cd22459bf0d6642f6b16ea59f39663c4a76.tar.gz hdf5-282d1cd22459bf0d6642f6b16ea59f39663c4a76.tar.bz2 |
[svn-r20591] On windows the ext libs did not work for cpack process. Changed ext lib handling to get the correct path. Needs more work to remove the the pre-install copying.
Bring r20590 from trunk
Tested: windows
-rw-r--r-- | CMakeLists.txt | 42 | ||||
-rw-r--r-- | config/cmake/HDFMacros.cmake | 50 | ||||
-rwxr-xr-x | config/cmake/mccacheinit.cmake | 8 |
3 files changed, 30 insertions, 70 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d1e026..dd7d963 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,6 +222,9 @@ ENDIF (NOT HDF5_EXPORTED_TARGETS) # which include hdf5 as a sub-project within their build tree #----------------------------------------------------------------------------- SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "") +SET (EXTERNAL_HEADER_LIST "") +SET (EXTERNAL_LIBRARY_LIST "") +SET (EXTERNAL_LIBRARYDLL_LIST "") #----------------------------------------------------------------------------- # Run all the CMake configuration tests for our build environment @@ -550,11 +553,6 @@ ENDIF (HDF5_ENABLE_SZIP_SUPPORT) OPTION (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF) 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) PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) @@ -563,40 +561,6 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED) 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) - - 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 diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake index cf23846..f830c84 100644 --- a/config/cmake/HDFMacros.cmake +++ b/config/cmake/HDFMacros.cmake @@ -48,8 +48,13 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic) ELSE (${BLDTYPE} MATCHES "Debug") SET (DBG_EXT "") ENDIF (${BLDTYPE} MATCHES "Debug") + SET (EXTERNAL_LIBRARY_LIST ${EXTERNAL_LIBRARY_LIST} ${JPEG_LIBRARY}) - SET (JPEG_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/libjpeg${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") + IF (WIN32 AND NOT MINGW) + SET (JPEG_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/libjpeg${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") + ELSE (WIN32 AND NOT MINGW) + SET (JPEG_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libjpeg${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") + ENDIF (WIN32 AND NOT MINGW) SET (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}") SET (JPEG_INCLUDE_DIR "${SOURCE_DIR}/src") SET (JPEG_FOUND 1) @@ -64,8 +69,6 @@ MACRO (PACKAGE_JPEG_LIBRARY compress_type) COMMENT "Copying ${JPEG_INCLUDE_DIR_GEN}/jconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" ) SET (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/jconfig.h) - GET_FILENAME_COMPONENT(JPEG_LIB_NAME ${JPEG_LIBRARY} NAME) - SET (EXTERNAL_LIBRARY_LIST ${EXTERNAL_LIBRARY_LIST} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${JPEG_LIB_NAME}) IF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") ADD_DEPENDENCIES (JPEG-GenHeader-Copy JPEG) ENDIF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") @@ -116,13 +119,20 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding) IF (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) - SET (SZIP_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}szip${DBG_EXT}${CMAKE_IMPORT_LIBRARY_SUFFIX}") + SET (SZIP_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}szip${DBG_EXT}${CMAKE_IMPORT_LIBRARY_SUFFIX}") + SET (EXTERNAL_LIBRARYDLL_LIST ${EXTERNAL_LIBRARYDLL_LIST} "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}szip${DBG_EXT}${CMAKE_SHARED_LIBRARY_SUFFIX}") ELSE (WIN32 AND NOT MINGW) - SET (SZIP_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}szip${DBG_EXT}${CMAKE_SHARED_LIBRARY_SUFFIX}") + SET (SZIP_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}szip${DBG_EXT}${CMAKE_SHARED_LIBRARY_SUFFIX}") ENDIF (WIN32 AND NOT MINGW) ELSE (${libtype} MATCHES "SHARED") - SET (SZIP_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/libszip${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") + IF (WIN32 AND NOT MINGW) + SET (SZIP_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/libszip${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") + ELSE (WIN32 AND NOT MINGW) + SET (SZIP_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libszip${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") + ENDIF (WIN32 AND NOT MINGW) ENDIF (${libtype} MATCHES "SHARED") + SET (EXTERNAL_LIBRARY_LIST ${EXTERNAL_LIBRARY_LIST} ${SZIP_LIBRARY}) + SET (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}") SET (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src") SET (SZIP_FOUND 1) @@ -137,17 +147,9 @@ MACRO (PACKAGE_SZIP_LIBRARY compress_type libtype) COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" ) SET (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SZconfig.h) - GET_FILENAME_COMPONENT(SZIP_LIB_NAME ${SZIP_LIBRARY} NAME) - SET (EXTERNAL_LIBRARY_LIST ${EXTERNAL_LIBRARY_LIST} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${SZIP_LIB_NAME}) IF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") ADD_DEPENDENCIES (SZIP-GenHeader-Copy SZIP) ENDIF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") - IF (WIN32 AND NOT CYGWIN) - IF (${libtype} MATCHES "SHARED") - GET_FILENAME_COMPONENT(SZIP_DLL_NAME ${SZIP_LIBRARY} NAME_WE) - SET (EXTERNAL_LIBRARYDLL_LIST ${EXTERNAL_LIBRARYDLL_LIST} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) - ENDIF (${libtype} MATCHES "SHARED") - ENDIF (WIN32 AND NOT CYGWIN) ENDMACRO (PACKAGE_SZIP_LIBRARY) #------------------------------------------------------------------------------- @@ -195,21 +197,23 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype) IF (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) - SET (ZLIB_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}zlib1${DBG_EXT}${CMAKE_IMPORT_LIBRARY_SUFFIX}") + SET (ZLIB_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}zlib1${DBG_EXT}${CMAKE_IMPORT_LIBRARY_SUFFIX}") + SET (EXTERNAL_LIBRARYDLL_LIST ${EXTERNAL_LIBRARYDLL_LIST} "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}zlib1${DBG_EXT}") ELSE (WIN32 AND NOT MINGW) - SET (ZLIB_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}z${DBG_EXT}${CMAKE_SHARED_LIBRARY_SUFFIX}") + SET (ZLIB_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}z${DBG_EXT}${CMAKE_SHARED_LIBRARY_SUFFIX}") ENDIF (WIN32 AND NOT MINGW) ELSE (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) IF (HDF_LEGACY_NAMING) - SET (ZLIB_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/zlib${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") + SET (ZLIB_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/zlib${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") ELSE (HDF_LEGACY_NAMING) - SET (ZLIB_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/libzlib${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") + SET (ZLIB_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/libzlib${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") ENDIF (HDF_LEGACY_NAMING) ELSE (WIN32 AND NOT MINGW) - SET (ZLIB_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/libz${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") + SET (ZLIB_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libz${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") ENDIF (WIN32 AND NOT MINGW) ENDIF (${libtype} MATCHES "SHARED") + SET (EXTERNAL_LIBRARY_LIST ${EXTERNAL_LIBRARY_LIST} ${ZLIB_LIBRARY}) SET (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}") SET (ZLIB_INCLUDE_DIR "${SOURCE_DIR}/src") @@ -225,17 +229,9 @@ MACRO (PACKAGE_ZLIB_LIBRARY compress_type libtype) COMMENT "Copying ${ZLIB_INCLUDE_DIR_GEN}/zconf.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" ) SET (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h) - GET_FILENAME_COMPONENT(ZLIB_LIB_NAME ${ZLIB_LIBRARY} NAME) - SET (EXTERNAL_LIBRARY_LIST ${EXTERNAL_LIBRARY_LIST} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ZLIB_LIB_NAME}) IF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") ADD_DEPENDENCIES (ZLIB-GenHeader-Copy ZLIB) ENDIF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") - IF (WIN32 AND NOT CYGWIN) - IF (${libtype} MATCHES "SHARED") - GET_FILENAME_COMPONENT(ZLIB_DLL_NAME ${ZLIB_LIBRARY} NAME_WE) - SET (EXTERNAL_LIBRARYDLL_LIST ${EXTERNAL_LIBRARYDLL_LIST} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) - ENDIF (${libtype} MATCHES "SHARED") - ENDIF (WIN32 AND NOT CYGWIN) ENDMACRO (PACKAGE_ZLIB_LIBRARY) #------------------------------------------------------------------------------- diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake index f7313ba..e467a60 100755 --- a/config/cmake/mccacheinit.cmake +++ b/config/cmake/mccacheinit.cmake @@ -8,13 +8,13 @@ SET (BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE) SET (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
-SET (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
+SET (HDF5_BUILD_CPP_LIB OFF CACHE BOOL "Build HDF5 C++ Library" FORCE)
-SET (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
+SET (HDF5_BUILD_EXAMPLES OFF CACHE BOOL "Build HDF5 Library Examples" FORCE)
-SET (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
+SET (HDF5_BUILD_FORTRAN OFF CACHE BOOL "Build FORTRAN support" FORCE)
-SET (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
+SET (HDF5_BUILD_HL_LIB OFF CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
SET (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
|