From a1a1aba1308077a0a7fcfdb300d86349667430ba Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Nov 2014 12:24:04 -0500 Subject: [svn-r25839] Remove hard coded urls. Add WiX support. Add file test depends. --- CMakeFilters.cmake | 4 --- CMakeInstallation.cmake | 75 ++++++++++++++++++++++++++++++++++++++++++++++++- test/CMakeTests.cmake | 1 + 3 files changed, 75 insertions(+), 5 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index a763b09..89fb404 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -11,10 +11,6 @@ MACRO (HDF5_SETUP_FILTERS FILTER) # message (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}") ENDMACRO (HDF5_SETUP_FILTERS) -# Default Subversion URLs point to our repositories -set (ZLIB_SVN_URL "https://svn.hdfgroup.uiuc.edu/zlib/trunk") -set (SZIP_SVN_URL "https://svn.hdfgroup.uiuc.edu/szip/trunk") - HDF5_SETUP_FILTERS (SHUFFLE) HDF5_SETUP_FILTERS (FLETCHER32) HDF5_SETUP_FILTERS (NBIT) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 1e6a5bf..f2053b5 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -1,5 +1,13 @@ #----------------------------------------------------------------------------- +# Check for Installation Utilities +#----------------------------------------------------------------------------- +if (WIN32) + find_program (NSIS_EXECUTABLE NSIS.exe PATHS "$ENV{ProgramFiles}\\NSIS" "$ENV{ProgramFiles(x86)}\\NSIS") + find_program (WIX_EXECUTABLE candle PATHS "$ENV{ProgramFiles}\\WiX\ Toolset\ v3.9\\bin" "$ENV{ProgramFiles(x86)}\\WiX\ Toolset\ v3.9\\bin") +endif (WIN32) + +#----------------------------------------------------------------------------- # Add file(s) to CMake Install #----------------------------------------------------------------------------- if (NOT HDF5_INSTALL_NO_DEVELOPMENT) @@ -142,6 +150,13 @@ endif (HDF5_PACK_EXAMPLES) HDF_README_PROPERTIES(HDF5_BUILD_FORTRAN) #----------------------------------------------------------------------------- +# Configure the COPYING.txt file for the windows binary package +#----------------------------------------------------------------------------- +if (WIN32) + configure_file (${HDF5_SOURCE_DIR}/COPYING ${HDF5_BINARY_DIR}/COPYING.txt @ONLY) +endif (WIN32) + +#----------------------------------------------------------------------------- # Add Document File(s) to CMake Install #----------------------------------------------------------------------------- if (NOT HDF5_EXTERNALLY_CONFIGURED) @@ -197,6 +212,19 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs") endif (NOT HDF5_EXTERNALLY_CONFIGURED) +if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + if (CMAKE_HOST_UNIX) + set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}" + CACHE PATH "Install path prefix, prepended onto install directories." FORCE) + else (CMAKE_HOST_UNIX) + GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES) + set (CMAKE_INSTALL_PREFIX + "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}" + CACHE PATH "Install path prefix, prepended onto install directories." FORCE) + set (CMAKE_GENERIC_PROGRAM_FILES) + endif (CMAKE_HOST_UNIX) +endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + #----------------------------------------------------------------------------- # Set the cpack variables #----------------------------------------------------------------------------- @@ -222,7 +250,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_GENERATOR "TGZ") if (WIN32) - list (APPEND CPACK_GENERATOR "NSIS") + set (CPACK_GENERATOR "ZIP") + + if (NSIS_EXECUTABLE) + list (APPEND CPACK_GENERATOR "NSIS") + endif (NSIS_EXECUTABLE) # Installers for 32- vs. 64-bit CMake: # - Root install directory (displayed to end user at installer-run time) # - "NSIS package/display name" (text used in the installer GUI) @@ -246,6 +278,47 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_MONOLITHIC_INSTALL ON) set (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}") set (CPACK_NSIS_MODIFY_PATH ON) + + if (WIX_EXECUTABLE) + list (APPEND CPACK_GENERATOR "WIX") + endif (WIX_EXECUTABLE) +#WiX variables + set (CPACK_WIX_UNINSTALL "1") +# .. variable:: CPACK_WIX_LICENSE_RTF +# RTF License File +# +# If CPACK_RESOURCE_FILE_LICENSE has an .rtf extension it is used as-is. +# +# If CPACK_RESOURCE_FILE_LICENSE has an .txt extension it is implicitly +# converted to RTF by the WiX Generator. +# The expected encoding of the .txt file is UTF-8. +# +# With CPACK_WIX_LICENSE_RTF you can override the license file used by the +# WiX Generator in case CPACK_RESOURCE_FILE_LICENSE is in an unsupported +# format or the .txt -> .rtf conversion does not work as expected. + set (CPACK_RESOURCE_FILE_LICENSE "${HDF5_BINARY_DIR}/COPYING.txt") +# .. variable:: CPACK_WIX_PRODUCT_ICON +# The Icon shown next to the program name in Add/Remove programs. + set(CPACK_WIX_PRODUCT_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico") +# +# .. variable:: CPACK_WIX_UI_BANNER +# +# The bitmap will appear at the top of all installer pages other than the +# welcome and completion dialogs. +# +# If set, this image will replace the default banner image. +# +# This image must be 493 by 58 pixels. +# +# .. variable:: CPACK_WIX_UI_DIALOG +# +# Background bitmap used on the welcome and completion dialogs. +# +# If this variable is set, the installer will replace the default dialog +# image. +# +# This image must be 493 by 312 pixels. +# elseif (APPLE) list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 549d5a7..ba6adad 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -434,6 +434,7 @@ if (HDF5_TEST_VFD) -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) endforeach (test ${H5_VFD_TESTS}) + set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) set_tests_properties (VFD-${vfdname}-objcopy PROPERTIES TIMEOUT 1000) set_tests_properties (VFD-${vfdname}-testhdf5 PROPERTIES TIMEOUT 1200) -- cgit v0.12