cpack.1.rst 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. cpack(1)
  2. ********
  3. ::
  4. cpack - Packaging driver provided by CMake.
  5. ::
  6. cpack -G <generator> [options]
  7. The "cpack" executable is the CMake packaging program.
  8. CMake-generated build trees created for projects that use the
  9. INSTALL_* commands have packaging support. This program will generate
  10. the package.
  11. CMake is a cross-platform build system generator. Projects specify
  12. their build process with platform-independent CMake listfiles included
  13. in each directory of a source tree with the name CMakeLists.txt.
  14. Users build a project by using CMake to generate a build system for a
  15. native tool on their platform.
  16. * ``-G <generator>``: Use the specified generator to generate package.
  17. CPack may support multiple native packaging systems on certain
  18. platforms. A generator is responsible for generating input files
  19. for particular system and invoking that systems. Possible generator
  20. names are specified in the Generators section.
  21. * ``-C <Configuration>``: Specify the project configuration
  22. This option specifies the configuration that the project was build
  23. with, for example 'Debug', 'Release'.
  24. * ``-D <var>=<value>``: Set a CPack variable.
  25. Set a variable that can be used by the generator.
  26. * ``--config <config file>``: Specify the config file.
  27. Specify the config file to use to create the package. By default
  28. CPackConfig.cmake in the current directory will be used.
  29. * ``--verbose,-V``: enable verbose output
  30. Run cpack with verbose output.
  31. * ``--debug``: enable debug output (for CPack developers)
  32. Run cpack with debug output (for CPack developers).
  33. * ``-P <package name>``: override/define CPACK_PACKAGE_NAME
  34. If the package name is not specified on cpack commmand line
  35. thenCPack.cmake defines it as CMAKE_PROJECT_NAME
  36. * ``-R <package version>``: override/define CPACK_PACKAGE_VERSION
  37. If version is not specified on cpack command line thenCPack.cmake
  38. defines it from CPACK_PACKAGE_VERSION_[MAJOR|MINOR|PATCH]look into
  39. CPack.cmake for detail
  40. * ``-B <package directory>``: override/define CPACK_PACKAGE_DIRECTORY
  41. The directory where CPack will be doing its packaging work.The
  42. resulting package will be found there. Inside this directoryCPack
  43. creates '_CPack_Packages' sub-directory which is theCPack temporary
  44. directory.
  45. * ``--vendor <vendor name>``: override/define CPACK_PACKAGE_VENDOR
  46. If vendor is not specified on cpack command line (or inside
  47. CMakeLists.txt) thenCPack.cmake defines it with a default value
  48. * ``--help-command cmd [file]``: Print help for a single command and exit.
  49. Full documentation specific to the given command is displayed. If a
  50. file is specified, the documentation is written into and the output
  51. format is determined depending on the filename suffix. Supported
  52. are man page, HTML, DocBook and plain text.
  53. * ``--help-command-list [file]``: List available commands and exit.
  54. The list contains all commands for which help may be obtained by
  55. using the --help-command argument followed by a command name. If a
  56. file is specified, the documentation is written into and the output
  57. format is determined depending on the filename suffix. Supported
  58. are man page, HTML, DocBook and plain text.
  59. * ``--help-commands [file]``: Print help for all commands and exit.
  60. Full documentation specific for all current command is displayed.If
  61. a file is specified, the documentation is written into and the
  62. output format is determined depending on the filename suffix.
  63. Supported are man page, HTML, DocBook and plain text.
  64. * ``--help-variable var [file]``: Print help for a single variable and exit.
  65. Full documentation specific to the given variable is displayed.If a
  66. file is specified, the documentation is written into and the output
  67. format is determined depending on the filename suffix. Supported
  68. are man page, HTML, DocBook and plain text.
  69. * ``--help-variable-list [file]``: List documented variables and exit.
  70. The list contains all variables for which help may be obtained by
  71. using the --help-variable argument followed by a variable name. If
  72. a file is specified, the help is written into it.If a file is
  73. specified, the documentation is written into and the output format
  74. is determined depending on the filename suffix. Supported are man
  75. page, HTML, DocBook and plain text.
  76. * ``--help-variables [file]``: Print help for all variables and exit.
  77. Full documentation for all variables is displayed.If a file is
  78. specified, the documentation is written into and the output format
  79. is determined depending on the filename suffix. Supported are man
  80. page, HTML, DocBook and plain text.
  81. * ``--copyright [file]``: Print the CMake copyright and exit.
  82. If a file is specified, the copyright is written into it.
  83. * ``--help,-help,-usage,-h,-H,/?``: Print usage information and exit.
  84. Usage describes the basic command line interface and its options.
  85. * ``--help-full [file]``: Print full help and exit.
  86. Full help displays most of the documentation provided by the UNIX
  87. man page. It is provided for use on non-UNIX platforms, but is also
  88. convenient if the man page is not installed. If a file is
  89. specified, the help is written into it.
  90. * ``--help-html [file]``: Print full help in HTML format.
  91. This option is used by CMake authors to help produce web pages. If
  92. a file is specified, the help is written into it.
  93. * ``--help-man [file]``: Print full help as a UNIX man page and exit.
  94. This option is used by the cmake build to generate the UNIX man
  95. page. If a file is specified, the help is written into it.
  96. * ``--version,-version,/V [file]``: Show program name/version banner and exit.
  97. If a file is specified, the version is written into it.
  98. The following resources are available to get help using CMake:
  99. * ``Home Page``: http://www.cmake.org
  100. The primary starting point for learning about CMake.
  101. * ``Frequently Asked Questions``: http://www.cmake.org/Wiki/CMake_FAQ
  102. A Wiki is provided containing answers to frequently asked questions.
  103. * ``Online Documentation``: http://www.cmake.org/HTML/Documentation.html
  104. Links to available documentation may be found on this web page.
  105. * ``Mailing List``: http://www.cmake.org/HTML/MailingLists.html
  106. For help and discussion about using cmake, a mailing list is
  107. provided at [email protected]. The list is member-post-only but one
  108. may sign up on the CMake web page. Please first read the full
  109. documentation at http://www.cmake.org before posting questions to
  110. the list.