From 3d8b36f6d16b680043f0f49c863ce5c6f0c525e2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 15 Oct 2015 13:01:21 -0500 Subject: [PATCH] [svn-r28085] Add option to change cpack install location version (1.9 instead of 1.9.xxx) useful on windows. --- CMakeInstallation.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index f87119e1c6..bb5f046afb 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -295,7 +295,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) 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}") + if (OVERRIDE_INSTALL_VERSION) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${OVERRIDE_INSTALL_VERSION}") + else (OVERRIDE_INSTALL_VERSION) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + endif (OVERRIDE_INSTALL_VERSION) set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp") set (CPACK_GENERATOR "TGZ") @@ -324,7 +328,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) # set the package header icon for MUI set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.bmp") set (CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}") - set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}") + if (OVERRIDE_INSTALL_VERSION) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${OVERRIDE_INSTALL_VERSION}") + else (OVERRIDE_INSTALL_VERSION) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}") + endif (OVERRIDE_INSTALL_VERSION) set (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}") set (CPACK_NSIS_MODIFY_PATH ON)