diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2014-02-27 19:16:04 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2014-02-27 19:16:04 (GMT) |
commit | e5759186e8d28b1acf4e38f4181667200ecead00 (patch) | |
tree | af0529f3b448b853b4bab4e392c0f07d4fcf6d19 /CMakeInstallation.cmake | |
parent | e674aaf859d6d0658e48221ed77c283dcc4f82fa (diff) | |
download | hdf5-e5759186e8d28b1acf4e38f4181667200ecead00.zip hdf5-e5759186e8d28b1acf4e38f4181667200ecead00.tar.gz hdf5-e5759186e8d28b1acf4e38f4181667200ecead00.tar.bz2 |
[svn-r24746] Merge trunk revision 24744 from cmake branch includes;
HDFFV-8505: UD filter changes to remove filters in h5repack.
Tested: local linux
Diffstat (limited to 'CMakeInstallation.cmake')
-rw-r--r-- | CMakeInstallation.cmake | 93 |
1 files changed, 83 insertions, 10 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 20891de..1d74786 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -137,6 +137,54 @@ IF (HDF5_PACK_EXAMPLES) ENDIF (HDF5_PACK_EXAMPLES) #----------------------------------------------------------------------------- +# Configure the README.txt file for the binary package +#----------------------------------------------------------------------------- +SET (BINARY_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}) +SET (BINARY_PLATFORM "${CMAKE_SYSTEM_NAME}") +IF (WIN32) + SET (BINARY_EXAMPLE_ENDING "zip") + SET (BINARY_INSTALL_ENDING "exe") + IF (CMAKE_CL_64) + SET (BINARY_SYSTEM_NAME "win64") + ELSE (CMAKE_CL_64) + SET (BINARY_SYSTEM_NAME "win32") + ENDIF (CMAKE_CL_64) + IF (${CMAKE_SYSTEM_VERSION} MATCHES "6.1") + SET (BINARY_PLATFORM "${BINARY_PLATFORM} 7") + ELSEIF (${CMAKE_SYSTEM_VERSION} MATCHES "6.2") + SET (BINARY_PLATFORM "${BINARY_PLATFORM} 8") + ENDIF (${CMAKE_SYSTEM_VERSION} MATCHES "6.1") + SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}") + IF (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010") + ELSEIF (${CMAKE_C_COMPILER_VERSION} MATCHES "15.*") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008") + ELSEIF (${CMAKE_C_COMPILER_VERSION} MATCHES "17.*") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012") + ELSE (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}") + ENDIF (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*") +ELSEIF (APPLE) + SET (BINARY_EXAMPLE_ENDING "tar.gz") + SET (BINARY_INSTALL_ENDING "dmg") + SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}") +ELSE (WIN32) + SET (BINARY_EXAMPLE_ENDING "tar.gz") + SET (BINARY_INSTALL_ENDING "sh") + SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}") +ENDIF (WIN32) +IF (HDF4_BUILD_FORTRAN) + SET (BINARY_PLATFORM "${BINARY_PLATFORM} / ${CMAKE_Fortran_COMPILER_ID} Fortran") +ENDIF (HDF4_BUILD_FORTRAN) + +CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/README.txt.cmake.in + ${HDF5_BINARY_DIR}/README.txt @ONLY +) + +#----------------------------------------------------------------------------- # Add Document File(s) to CMake Install #----------------------------------------------------------------------------- IF (NOT HDF5_EXTERNALLY_CONFIGURED) @@ -199,17 +247,22 @@ ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_PACKAGE_VENDOR "HDF_Group") SET (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}") - SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}") + IF (CDASH_LOCAL) + SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}") + ELSE (CDASH_LOCAL) + SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION_STRING}") + ENDIF (CDASH_LOCAL) SET (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}") SET (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}") SET (CPACK_PACKAGE_VERSION_PATCH "") - SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") SET (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt") SET (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/COPYING") SET (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt") ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") SET (CPACK_PACKAGE_RELOCATABLE TRUE) + SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.bmp") SET (CPACK_GENERATOR "TGZ") IF (WIN32) @@ -218,15 +271,20 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) # - Root install directory (displayed to end user at installer-run time) # - "NSIS package/display name" (text used in the installer GUI) # - Registry key used to store info about the installation + SET (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING}") IF (CMAKE_CL_64) SET (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") - SET (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING} (Win64)") - SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_STRING}-${LIB_TYPE} (Win64)") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION} (Win64)") ELSE (CMAKE_CL_64) SET (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") - SET (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING}") - SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_STRING}-${LIB_TYPE}") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") ENDIF (CMAKE_CL_64) + # set the install/unistall icon used for the installer itself + # There is a bug in NSI that does not handle full unix paths properly. + SET (CPACK_NSIS_MUI_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico") + SET (CPACK_NSIS_MUI_UNIICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico") + # set the package header icon for MUI + SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.bmp") SET (CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, is a data model, library, and file format for storing and managing data") SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}") SET (CPACK_MONOLITHIC_INSTALL ON) @@ -237,8 +295,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}") SET (CPACK_PACKAGING_INSTALL_PREFIX "/") - SET (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}") - SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") + SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns") SET (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/". IF (HDF5_PACK_MACOSX_BUNDLE) @@ -246,11 +303,14 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") SET (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / SET (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") - SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") + SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns") SET (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist") SET (CPACK_APPLE_GUI_INFO_STRING "HDF5 (Hierarchical Data Format 5) Software Library and Utilities") - SET (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2013 by The HDF Group. All rights reserved.") + SET (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2014 by The HDF Group. All rights reserved.") SET (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}") + SET (CPACK_APPLE_GUI_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") + SET (CPACK_APPLE_GUI_VERSION_STRING "${CPACK_PACKAGE_VERSION_STRING}") + SET (CPACK_APPLE_GUI_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}") #----------------------------------------------------------------------------- # Configure the Info.plist file for the install bundle #----------------------------------------------------------------------------- @@ -258,6 +318,19 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) ${HDF5_RESOURCES_DIR}/CPack.Info.plist.in ${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY ) + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/PkgInfo.in + ${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo @ONLY + ) + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/version.plist.in + ${HDF5_BINARY_DIR}/CMakeFiles/version.plist @ONLY + ) + INSTALL ( + FILES ${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo + ${HDF5_BINARY_DIR}/CMakeFiles/version.plist + DESTINATION .. + ) ENDIF(HDF5_PACK_MACOSX_BUNDLE) ELSE (WIN32) LIST (APPEND CPACK_GENERATOR "STGZ") |