cpack.1.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. .. cmake-manual-description: CPack Command-Line Reference
  2. cpack(1)
  3. ********
  4. Synopsis
  5. ========
  6. .. parsed-literal::
  7. cpack -G <generator> [<options>]
  8. Description
  9. ===========
  10. The "cpack" executable is the CMake packaging program.
  11. CMake-generated build trees created for projects that use the
  12. INSTALL_* commands have packaging support. This program will generate
  13. the package.
  14. CMake is a cross-platform build system generator. Projects specify
  15. their build process with platform-independent CMake listfiles included
  16. in each directory of a source tree with the name CMakeLists.txt.
  17. Users build a project by using CMake to generate a build system for a
  18. native tool on their platform.
  19. Options
  20. =======
  21. ``-G <generator>``
  22. Use the specified generator to generate package.
  23. CPack may support multiple native packaging systems on certain
  24. platforms. A generator is responsible for generating input files
  25. for particular system and invoking that systems. Possible generator
  26. names are specified in the Generators section.
  27. ``-C <Configuration>``
  28. Specify the project configuration
  29. This option specifies the configuration that the project was build
  30. with, for example 'Debug', 'Release'.
  31. ``-D <var>=<value>``
  32. Set a CPack variable.
  33. Set a variable that can be used by the generator.
  34. ``--config <config file>``
  35. Specify the config file.
  36. Specify the config file to use to create the package. By default
  37. CPackConfig.cmake in the current directory will be used.
  38. ``--verbose,-V``
  39. enable verbose output
  40. Run cpack with verbose output.
  41. ``--debug``
  42. enable debug output (for CPack developers)
  43. Run cpack with debug output (for CPack developers).
  44. ``-P <package name>``
  45. override/define CPACK_PACKAGE_NAME
  46. If the package name is not specified on cpack command line
  47. thenCPack.cmake defines it as CMAKE_PROJECT_NAME
  48. ``-R <package version>``
  49. override/define CPACK_PACKAGE_VERSION
  50. If version is not specified on cpack command line thenCPack.cmake
  51. defines it from CPACK_PACKAGE_VERSION_[MAJOR|MINOR|PATCH]look into
  52. CPack.cmake for detail
  53. ``-B <package directory>``
  54. override/define CPACK_PACKAGE_DIRECTORY
  55. The directory where CPack will be doing its packaging work.The
  56. resulting package will be found there. Inside this directoryCPack
  57. creates '_CPack_Packages' sub-directory which is theCPack temporary
  58. directory.
  59. ``--vendor <vendor name>``
  60. override/define CPACK_PACKAGE_VENDOR
  61. If vendor is not specified on cpack command line (or inside
  62. CMakeLists.txt) thenCPack.cmake defines it with a default value
  63. .. include:: OPTIONS_HELP.txt
  64. See Also
  65. ========
  66. .. include:: LINKS.txt