diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2014-11-17 20:57:46 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2014-11-17 20:57:46 (GMT) |
commit | 36a847bc0ccc402857d05d9a5b5d8502081469e9 (patch) | |
tree | da500f8ce4c90030ac37d30a4b29667507bceaf5 /CMakeInstallation.cmake | |
parent | 59132dec15935c4c402e60137537ed8669d3aa97 (diff) | |
download | hdf5-36a847bc0ccc402857d05d9a5b5d8502081469e9.zip hdf5-36a847bc0ccc402857d05d9a5b5d8502081469e9.tar.gz hdf5-36a847bc0ccc402857d05d9a5b5d8502081469e9.tar.bz2 |
[svn-r25818] Add checks for windows installers
Diffstat (limited to 'CMakeInstallation.cmake')
-rw-r--r-- | CMakeInstallation.cmake | 62 |
1 files changed, 61 insertions, 1 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index f82d3b4..9c92a29 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -1,6 +1,14 @@ include (${HDF_RESOURCES_DIR}/CMakePackageConfigHelpers.cmake) #----------------------------------------------------------------------------- +# 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) @@ -180,6 +188,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) @@ -273,7 +288,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) @@ -297,6 +316,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) |