diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cb283a3..aa3bbbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -343,7 +343,7 @@ SET (EXE_EXT "") IF (WIN32) SET (EXE_EXT ".exe") IF (NOT CYGWIN) - ADD_DEFINITIONS (-DBIND_TO_CURRENT_VCLIBS_VERSION=1) + ADD_DEFINITIONS (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1) ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS) ADD_DEFINITIONS (-D_CONSOLE) ENDIF (NOT CYGWIN) @@ -1208,16 +1208,37 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") SET (CPACK_PACKAGE_RELOCATABLE TRUE) + SET (CPACK_GENERATOR "TGZ") IF (WIN32) - SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_NAME}-${HDF5_PACKAGE_VERSION}-${LIB_TYPE}") + LIST (APPEND CPACK_GENERATOR "NSIS") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LIB_TYPE}") SET (CPACK_MONOLITHIC_INSTALL ON) SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}") SET (CPACK_NSIS_MODIFY_PATH ON) - SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${HDF5_PACKAGE_VERSION}") + SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${CPACK_PACKAGE_VERSION}") ELSEIF (APPLE) + LIST (APPEND CPACK_GENERATOR "DragNDrop") 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_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/". + + LIST (APPEND CPACK_GENERATOR "Bundle") + #----------------------------------------------------------------------------- + # Configure the Info.plist file for the install bundle + #----------------------------------------------------------------------------- + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/CPack.Info.plist.in + ${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY + ) + 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_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist") +# SET (CPACK_BUNDLE_STARTUP_COMMAND "${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-startup.sh") ELSE (WIN32) SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr") SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) |