cpack.1.rst 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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. ::
  99. CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.
  100. This is the documentation for now obsolete listfile commands from
  101. previous CMake versions, which are still supported for compatibility
  102. reasons. You should instead use the newer, faster and shinier new
  103. commands. ;-)
  104. Copyright 2000-2012 Kitware, Inc., Insight Software Consortium. All
  105. rights reserved.
  106. Redistribution and use in source and binary forms, with or without
  107. modification, are permitted provided that the following conditions are
  108. met:
  109. Redistributions of source code must retain the above copyright notice,
  110. this list of conditions and the following disclaimer.
  111. Redistributions in binary form must reproduce the above copyright
  112. notice, this list of conditions and the following disclaimer in the
  113. documentation and/or other materials provided with the distribution.
  114. Neither the names of Kitware, Inc., the Insight Software Consortium,
  115. nor the names of their contributors may be used to endorse or promote
  116. products derived from this software without specific prior written
  117. permission.
  118. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  119. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  120. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  121. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  122. HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  123. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  124. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  125. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  126. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  127. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  128. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  129. The following resources are available to get help using CMake:
  130. * ``Home Page``: http://www.cmake.org
  131. The primary starting point for learning about CMake.
  132. * ``Frequently Asked Questions``: http://www.cmake.org/Wiki/CMake_FAQ
  133. A Wiki is provided containing answers to frequently asked questions.
  134. * ``Online Documentation``: http://www.cmake.org/HTML/Documentation.html
  135. Links to available documentation may be found on this web page.
  136. * ``Mailing List``: http://www.cmake.org/HTML/MailingLists.html
  137. For help and discussion about using cmake, a mailing list is
  138. provided at [email protected]. The list is member-post-only but one
  139. may sign up on the CMake web page. Please first read the full
  140. documentation at http://www.cmake.org before posting questions to
  141. the list.