cmCPackDocumentVariables.cxx 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #include "cmCPackDocumentVariables.h"
  2. #include "cmake.h"
  3. void cmCPackDocumentVariables::DefineVariables(cmake* cm)
  4. {
  5. // Subsection: variables defined/used by cpack,
  6. // which are common to all CPack generators
  7. cm->DefineProperty
  8. ("CPACK_PACKAGING_INSTALL_PREFIX", cmProperty::VARIABLE,
  9. "The prefix used in the built package.",
  10. "Each CPack generator has a default value (like /usr)."
  11. " This default value may"
  12. " be overwritten from the CMakeLists.txt or the cpack command line"
  13. " by setting an alternative value.\n"
  14. "e.g. "
  15. " set(CPACK_PACKAGING_INSTALL_PREFIX \"/opt\")\n"
  16. "This is not the same purpose as CMAKE_INSTALL_PREFIX which"
  17. " is used when installing from the build tree without building"
  18. " a package."
  19. "", false,
  20. "Variables common to all CPack generators");
  21. cm->DefineProperty
  22. ("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", cmProperty::VARIABLE,
  23. "Boolean toggle to include/exclude top level directory.",
  24. "When preparing a package CPack installs the item under"
  25. " the so-called top level directory. The purpose of"
  26. " is to include (set to 1 or ON or TRUE) the top level directory"
  27. " in the package or not (set to 0 or OFF or FALSE).\n"
  28. "Each CPack generator has a built-in default value for this"
  29. " variable. E.g. Archive generators (ZIP, TGZ, ...) includes"
  30. " the top level whereas RPM or DEB don't. The user may override"
  31. " the default value by setting this variable.\n"
  32. "There is a similar variable "
  33. "CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY "
  34. "which may be used to override the behavior for the component"
  35. " packaging case which may have different default value for"
  36. " historical (now backward compatibility) reason.", false,
  37. "Variables common to all CPack generators");
  38. cm->DefineProperty
  39. ("CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY", cmProperty::VARIABLE,
  40. "Boolean toggle to include/exclude top level directory "
  41. "(component case).",
  42. "Similar usage as CPACK_INCLUDE_TOPLEVEL_DIRECTORY"
  43. " but for the component case. "
  44. "See CPACK_INCLUDE_TOPLEVEL_DIRECTORY documentation for"
  45. " the detail.", false,
  46. "Variables common to all CPack generators");
  47. cm->DefineProperty
  48. ("CPACK_SET_DESTDIR", cmProperty::VARIABLE,
  49. "Boolean toggle to make CPack use DESTDIR mechanism when"
  50. " packaging.", "DESTDIR means DESTination DIRectory."
  51. " It is commonly used by makefile "
  52. "users in order to install software at non-default location. It "
  53. "is a basic relocation mechanism that should not be used on"
  54. " Windows (see CMAKE_INSTALL_PREFIX documentation). "
  55. "It is usually invoked like this:\n"
  56. " make DESTDIR=/home/john install\n"
  57. "which will install the concerned software using the"
  58. " installation prefix, e.g. \"/usr/local\" prepended with "
  59. "the DESTDIR value which finally gives \"/home/john/usr/local\"."
  60. " When preparing a package, CPack first installs the items to be "
  61. "packaged in a local (to the build tree) directory by using the "
  62. "same DESTDIR mechanism. Nevertheless, if "
  63. "CPACK_SET_DESTDIR is set then CPack will set DESTDIR before"
  64. " doing the local install. The most noticeable difference is"
  65. " that without CPACK_SET_DESTDIR, CPack uses "
  66. "CPACK_PACKAGING_INSTALL_PREFIX as a prefix whereas with "
  67. "CPACK_SET_DESTDIR set, CPack will use CMAKE_INSTALL_PREFIX as"
  68. " a prefix.\n"
  69. "Manually setting CPACK_SET_DESTDIR may help (or simply be"
  70. " necessary) if some install rules uses absolute "
  71. "DESTINATION (see CMake INSTALL command)."
  72. " However, starting with"
  73. " CPack/CMake 2.8.3 RPM and DEB installers tries to handle DESTDIR"
  74. " automatically so that it is seldom necessary for the user to set"
  75. " it.", false,
  76. "Variables common to all CPack generators");
  77. cm->DefineProperty
  78. ("CPACK_INSTALL_SCRIPT", cmProperty::VARIABLE,
  79. "Extra CMake script provided by the user.",
  80. "If set this CMake script will be executed by CPack "
  81. "during its local [CPack-private] installation "
  82. "which is done right before packaging the files."
  83. " The script is not called by e.g.: make install.", false,
  84. "Variables common to all CPack generators");
  85. cm->DefineProperty
  86. ("CPACK_ABSOLUTE_DESTINATION_FILES", cmProperty::VARIABLE,
  87. "List of files which have been installed using "
  88. " an ABSOLUTE DESTINATION path.",
  89. "This variable is a Read-Only variable which is set internally"
  90. " by CPack during installation and before packaging using"
  91. " CMAKE_ABSOLUTE_DESTINATION_FILES defined in cmake_install.cmake "
  92. "scripts. The value can be used within CPack project configuration"
  93. " file and/or CPack<GEN>.cmake file of <GEN> generator.", false,
  94. "Variables common to all CPack generators");
  95. cm->DefineProperty
  96. ("CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
  97. "Ask CPack to warn each time a file with absolute INSTALL"
  98. " DESTINATION is encountered.",
  99. "This variable triggers the definition of "
  100. "CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs"
  101. " cmake_install.cmake scripts.", false,
  102. "Variables common to all CPack generators");
  103. cm->DefineProperty
  104. ("CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
  105. "Ask CPack to error out as soon as a file with absolute INSTALL"
  106. " DESTINATION is encountered.",
  107. "The fatal error is emitted before the installation of "
  108. "the offending file takes place. Some CPack generators, like NSIS,"
  109. "enforce this internally. "
  110. "This variable triggers the definition of"
  111. "CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs"
  112. "Variables common to all CPack generators");
  113. }