CMakeCPackOptions.cmake.in 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # This file is configured at cmake time, and loaded at cpack time.
  2. # To pass variables to cpack from cmake, they must be configured
  3. # in this file.
  4. if(CPACK_GENERATOR MATCHES "NSIS")
  5. set(CPACK_NSIS_INSTALL_ROOT "@CPACK_NSIS_INSTALL_ROOT@")
  6. # set the install/unistall icon used for the installer itself
  7. # There is a bug in NSI that does not handle full unix paths properly.
  8. set(CPACK_NSIS_MUI_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico")
  9. set(CPACK_NSIS_MUI_UNIICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico")
  10. # set the package header icon for MUI
  11. set(CPACK_PACKAGE_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeInstall.bmp")
  12. # tell cpack to create links to the doc files
  13. set(CPACK_NSIS_MENU_LINKS
  14. "@CMAKE_DOC_DIR@/html/index.html" "CMake Documentation"
  15. "http://www.cmake.org" "CMake Web Site"
  16. )
  17. # Use the icon from cmake-gui for add-remove programs
  18. set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\cmake-gui.exe")
  19. set(CPACK_NSIS_PACKAGE_NAME "@CPACK_NSIS_PACKAGE_NAME@")
  20. set(CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, a cross-platform, open-source build system")
  21. set(CPACK_NSIS_HELP_LINK "http://www.cmake.org")
  22. set(CPACK_NSIS_URL_INFO_ABOUT "http://www.kitware.com")
  23. set(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
  24. set(CPACK_NSIS_MODIFY_PATH ON)
  25. endif()
  26. # include the cpack options for qt dialog if they exist
  27. # they might not if qt was not enabled for the build
  28. include("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL)
  29. if(CPACK_GENERATOR MATCHES "IFW")
  30. # Version with QtIFW limitations
  31. set(CPACK_PACKAGE_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
  32. # Installer configuration
  33. set(CPACK_IFW_PACKAGE_TITLE "CMake Build Tool")
  34. set(CPACK_IFW_PRODUCT_URL "http://www.cmake.org")
  35. @_CPACK_IFW_PACKAGE_ICON@
  36. set(CPACK_IFW_PACKAGE_WINDOW_ICON "@CMake_SOURCE_DIR@/Source/QtDialog/CMakeSetup128.png")
  37. # Enable install default component
  38. set(CPACK_COMPONENTS_ALL "@_CPACK_IFW_COMPONENT_NAME@")
  39. # Component configuration
  40. set(CPACK_COMPONENT_@_CPACK_IFW_COMPONENT_UNAME@_DISPLAY_NAME "@CPACK_PACKAGE_NAME@")
  41. set(CPACK_COMPONENT_@_CPACK_IFW_COMPONENT_UNAME@_DESCRIPTION "@CPACK_PACKAGE_DESCRIPTION_SUMMARY@")
  42. # IFW component onfiguration
  43. set(CPACK_IFW_COMPONENT_@_CPACK_IFW_COMPONENT_UNAME@_NAME "@CPACK_PACKAGE_NAME@")
  44. set(CPACK_IFW_COMPONENT_@_CPACK_IFW_COMPONENT_UNAME@_LICENSES "@CPACK_PACKAGE_NAME@ Copyright" "@CPACK_RESOURCE_FILE_LICENSE@")
  45. @_CPACK_IFW_COMPONENT_SCRIPT@
  46. endif()
  47. if(CPACK_GENERATOR MATCHES "CygwinSource")
  48. # when packaging source make sure the .build directory is not included
  49. set(CPACK_SOURCE_IGNORE_FILES
  50. "/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$")
  51. endif()
  52. if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
  53. if(CMAKE_PACKAGE_QTGUI)
  54. set(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications")
  55. else()
  56. set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
  57. endif()
  58. endif()
  59. if("${CPACK_GENERATOR}" STREQUAL "WIX")
  60. # Reset CPACK_PACKAGE_VERSION to deal with WiX restriction.
  61. # But the file names still use the full CMake_VERSION value:
  62. set(CPACK_PACKAGE_FILE_NAME
  63. "${CPACK_PACKAGE_NAME}-@CMake_VERSION@-${CPACK_SYSTEM_NAME}")
  64. set(CPACK_SOURCE_PACKAGE_FILE_NAME
  65. "${CPACK_PACKAGE_NAME}-@CMake_VERSION@-Source")
  66. if(NOT CPACK_WIX_SIZEOF_VOID_P)
  67. set(CPACK_WIX_SIZEOF_VOID_P "@CMAKE_SIZEOF_VOID_P@")
  68. endif()
  69. set(CPACK_PACKAGE_VERSION
  70. "@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@")
  71. # WIX installers require at most a 4 component version number, where
  72. # each component is an integer between 0 and 65534 inclusive
  73. set(patch "@CMake_VERSION_PATCH@")
  74. if(patch MATCHES "^[0-9]+$" AND patch LESS 65535)
  75. set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.${patch}")
  76. endif()
  77. endif()