summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt125
-rwxr-xr-xconfig/cmake/CTestCustom.ctest4
-rw-r--r--config/cmake/ConfigureChecks.cmake3
3 files changed, 102 insertions, 30 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e9ecc6..8401c6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -477,6 +477,39 @@ IF (HDF5_ENABLE_SZIP_SUPPORT)
ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
#-----------------------------------------------------------------------------
+# Option for external libraries on windows
+#-----------------------------------------------------------------------------
+IF (WIN32)
+ OPTION (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF)
+ 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}.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/
+ COMMENT "Copying ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}.dll to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/"
+ )
+ 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}.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/
+ COMMENT "Copying ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}.dll to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/"
+ )
+ ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
+
+ ENDIF (BUILD_SHARED_LIBS)
+ENDIF (WIN32)
+
+#-----------------------------------------------------------------------------
# Option to use PACKED BITS SUPPORT
#-----------------------------------------------------------------------------
OPTION (HDF5_USE_H5DUMP_PACKED_BITS "Use the PACKED BITS feature in h5dump" OFF)
@@ -598,26 +631,74 @@ CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubcon
#-----------------------------------------------------------------------------
IF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
INSTALL (
- FILES
- ${PROJECT_BINARY_DIR}/H5pubconf.h
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT
- headers
+ FILES ${PROJECT_BINARY_DIR}/H5pubconf.h
+ DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT headers
)
ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
#-----------------------------------------------------------------------------
+# Option for external libraries on windows
+#-----------------------------------------------------------------------------
+IF (NOT HDF5_EXTERNALLY_CONFIGURED)
+ IF (HDF5_PACKAGE_EXTLIBS)
+ IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
+ INSTALL (
+ FILES ${ZLIB_INCLUDE_DIR}/zconf.h ${ZLIB_INCLUDE_DIR}/zlib.h
+ DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT headers
+ )
+ INSTALL(
+ FILES ${ZLIB_LIBRARY}
+ DESTINATION ${HDF5_INSTALL_LIB_DIR}
+ COMPONENT libraries
+ )
+ IF (BUILD_SHARED_LIBS)
+ 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}")
+ INSTALL(
+ FILES ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}.dll
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ COMPONENT libraries
+ )
+ ENDIF (BUILD_SHARED_LIBS)
+ ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
+ IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
+ INSTALL (
+ FILES ${SZIP_INCLUDE_DIR}/SZconfig.h ${SZIP_INCLUDE_DIR}/szlib.h ${SZIP_INCLUDE_DIR}/szip_adpt.h ${SZIP_INCLUDE_DIR}/ricehdf.h
+ DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT headers
+ )
+ INSTALL(
+ FILES ${SZIP_LIBRARY}
+ DESTINATION ${HDF5_INSTALL_LIB_DIR}
+ COMPONENT libraries
+ )
+ IF (BUILD_SHARED_LIBS)
+ 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: ${ZLIB_BIN_PATH}")
+ INSTALL(
+ FILES ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}.dll
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ COMPONENT libraries
+ )
+ ENDIF (BUILD_SHARED_LIBS)
+ ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
+ ENDIF (HDF5_PACKAGE_EXTLIBS)
+ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+
+#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
IF (NOT HDF5_EXTERNALLY_CONFIGURED)
INSTALL (
- EXPORT
- ${HDF5_EXPORTED_TARGETS}
- DESTINATION
- lib/cmake/hdf5-${HDF5_PACKAGE_VERSION}
- FILE
- hdf5-targets.cmake
+ EXPORT ${HDF5_EXPORTED_TARGETS}
+ DESTINATION lib/cmake/hdf5-${HDF5_PACKAGE_VERSION}
+ FILE hdf5-targets.cmake
)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
@@ -626,10 +707,8 @@ ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
IF (NOT HDF5_EXTERNALLY_CONFIGURED)
EXPORT (
- TARGETS
- ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES}
- FILE
- hdf5-targets.cmake
+ TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES}
+ FILE hdf5-targets.cmake
)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
@@ -658,10 +737,8 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
${HDF5_BINARY_DIR}/CMakeFiles/hdf5-config.cmake @ONLY
)
INSTALL (
- FILES
- ${HDF5_BINARY_DIR}/CMakeFiles/hdf5-config.cmake
- DESTINATION
- lib/cmake/hdf5-${HDF5_PACKAGE_VERSION}
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/hdf5-config.cmake
+ DESTINATION lib/cmake/hdf5-${HDF5_PACKAGE_VERSION}
)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
@@ -674,10 +751,8 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
${HDF5_BINARY_DIR}/CMakeFiles/hdf5-config-version.cmake @ONLY
)
INSTALL (
- FILES
- ${HDF5_BINARY_DIR}/CMakeFiles/hdf5-config-version.cmake
- DESTINATION
- lib/cmake/hdf5-${HDF5_PACKAGE_VERSION}
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/hdf5-config-version.cmake
+ DESTINATION lib/cmake/hdf5-${HDF5_PACKAGE_VERSION}
)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
@@ -702,7 +777,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND EXISTS "${HDF5_SOURCE_DIR}/release_docs")
#---------------------------------------------------------------------------
# Now list the cpack commands
#---------------------------------------------------------------------------
- CPACK_ADD_COMPONENT (applications
+ CPACK_ADD_COMPONENT (hdfapplications
DISPLAY_NAME "HDF5 Applications"
DEPENDS libraries
GROUP Applications
diff --git a/config/cmake/CTestCustom.ctest b/config/cmake/CTestCustom.ctest
index d55a559..c1538c0 100755
--- a/config/cmake/CTestCustom.ctest
+++ b/config/cmake/CTestCustom.ctest
@@ -2,8 +2,8 @@ SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1500)
SET (CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
- "H5detect.c.[0-9]+. : warning C4090:"
- "testhdf5.h.[0-9]+. : warning C4005:"
+ "H5detect.c.[0-9]+.[ ]*: warning C4090:"
+ "testhdf5.h.[0-9]+.[ ]*: warning C4005:"
"disabling jobserver mode"
)
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 3a16856..1318e90 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -563,8 +563,6 @@ ENDIF (INLINE_TEST___inline__)
# Check how to print a Long Long integer
#-----------------------------------------------------------------------------
IF (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
- SET (H5_PRINTF_LL_WIDTH "H5_PRINTF_LL_WIDTH")
- IF (H5_PRINTF_LL_WIDTH MATCHES "^H5_PRINTF_LL_WIDTH$")
SET (PRINT_LL_FOUND 0)
MESSAGE (STATUS "Checking for appropriate format for 64 bit long:")
FOREACH (HDF5_PRINTF_LL l64 l L q I64 ll)
@@ -600,7 +598,6 @@ IF (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
"Width for printf for type `long long' or `__int64', us. `ll"
)
ENDIF (PRINT_LL_FOUND)
- ENDIF (H5_PRINTF_LL_WIDTH MATCHES "^H5_PRINTF_LL_WIDTH$")
ENDIF (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
# ----------------------------------------------------------------------