cpack.1.rst 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. ``--trace``
  45. Put underlying cmake scripts in trace mode.
  46. ``--trace-expand``
  47. Put underlying cmake scripts in expanded trace mode.
  48. ``-P <package name>``
  49. override/define CPACK_PACKAGE_NAME
  50. If the package name is not specified on cpack command line
  51. thenCPack.cmake defines it as CMAKE_PROJECT_NAME
  52. ``-R <package version>``
  53. override/define CPACK_PACKAGE_VERSION
  54. If version is not specified on cpack command line thenCPack.cmake
  55. defines it from CPACK_PACKAGE_VERSION_[MAJOR|MINOR|PATCH]look into
  56. CPack.cmake for detail
  57. ``-B <package directory>``
  58. override/define CPACK_PACKAGE_DIRECTORY
  59. The directory where CPack will be doing its packaging work.The
  60. resulting package will be found there. Inside this directoryCPack
  61. creates '_CPack_Packages' sub-directory which is theCPack temporary
  62. directory.
  63. ``--vendor <vendor name>``
  64. override/define CPACK_PACKAGE_VENDOR
  65. If vendor is not specified on cpack command line (or inside
  66. CMakeLists.txt) thenCPack.cmake defines it with a default value
  67. .. include:: OPTIONS_HELP.txt
  68. See Also
  69. ========
  70. .. include:: LINKS.txt