CMakeCPackOptions.cmake.in 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 "CygwinSource")
  30. # when packaging source make sure the .build directory is not included
  31. set(CPACK_SOURCE_IGNORE_FILES
  32. "/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$")
  33. endif()
  34. if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
  35. if(CMAKE_PACKAGE_QTGUI)
  36. set(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications")
  37. else()
  38. set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
  39. endif()
  40. endif()
  41. if("${CPACK_GENERATOR}" STREQUAL "WIX")
  42. # Reset CPACK_PACKAGE_VERSION to deal with WiX restriction.
  43. # But the file names still use the full CMake_VERSION value:
  44. set(CPACK_PACKAGE_FILE_NAME
  45. "${CPACK_PACKAGE_NAME}-@CMake_VERSION@-${CPACK_SYSTEM_NAME}")
  46. set(CPACK_SOURCE_PACKAGE_FILE_NAME
  47. "${CPACK_PACKAGE_NAME}-@CMake_VERSION@-Source")
  48. if(NOT CPACK_WIX_SIZEOF_VOID_P)
  49. set(CPACK_WIX_SIZEOF_VOID_P "@CMAKE_SIZEOF_VOID_P@")
  50. endif()
  51. set(CPACK_PACKAGE_VERSION
  52. "@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@.@CMake_VERSION_PATCH@")
  53. # WIX installers require at most a 4 component version number, where
  54. # each component is an integer between 0 and 65534 inclusive
  55. set(tweak "@CMake_VERSION_TWEAK@")
  56. if(tweak MATCHES "^[0-9]+$")
  57. if(tweak GREATER 0 AND tweak LESS 65535)
  58. set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.${tweak}")
  59. endif()
  60. endif()
  61. endif()