summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorJoachim Wuttke (o) <j.wuttke@fz-juelich.de>2020-02-13 09:06:55 (GMT)
committerCraig Scott <craig.scott@crascit.com>2020-02-14 10:47:08 (GMT)
commit40da958d235a7efc15607436d8ce6fdaee274342 (patch)
tree2ce354237386cfc23ac956c59c798ca3c4df6064 /Help
parent1acea5cb2674b8963a1fe6679c0976539c080146 (diff)
downloadCMake-40da958d235a7efc15607436d8ce6fdaee274342.zip
CMake-40da958d235a7efc15607436d8ce6fdaee274342.tar.gz
CMake-40da958d235a7efc15607436d8ce6fdaee274342.tar.bz2
Help: CPack Archive Generator: Clarify source vs binary package
- Simplify summary - Revise introduction: - Explain how to package source files, provide configuration sample - Clarify source vs binary package - Clarify meaning of variables (Mandatory=ON makes no sense if a default is defined)
Diffstat (limited to 'Help')
-rw-r--r--Help/cpack_gen/archive.rst47
1 files changed, 32 insertions, 15 deletions
diff --git a/Help/cpack_gen/archive.rst b/Help/cpack_gen/archive.rst
index d455f4b..052f9cf 100644
--- a/Help/cpack_gen/archive.rst
+++ b/Help/cpack_gen/archive.rst
@@ -1,8 +1,8 @@
CPack Archive Generator
-----------------------
-Archive CPack generator that supports packaging of sources and binaries in
-different formats:
+CPack generator for packaging files into an archive, which can have
+any of the following formats:
- 7Z - 7zip - (.7z)
- TBZ2 (.tar.bz2)
@@ -12,25 +12,42 @@ different formats:
- TZST (.tar.zst)
- ZIP (.zip)
+When this generator is called from ``CPackSourceConfig.cmake`` (or through
+the ``package_source`` target), then the generated archive will contain all
+files in the project directory, except those specified in
+:variable:`CPACK_SOURCE_IGNORE_FILES`. The following is one example of
+packaging all source files of a project:
+
+.. code-block:: cmake
+
+ set(CPACK_SOURCE_GENERATOR "TGZ")
+ set(CPACK_SOURCE_IGNORE_FILES
+ \\.git/
+ build/
+ ".*~$"
+ )
+ set(CPACK_VERBATIM_VARIABLES YES)
+ include(CPack)
+
+When this is generator is called from ``CPackConfig.cmake`` (or through the
+``package`` target), then the generated archive will contain all files
+that have been installed via CMake's :command:`install` command (and the
+deprecated commands :command:`install_files`, :command:`install_programs`,
+and :command:`install_targets`).
+
Variables specific to CPack Archive generator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. variable:: CPACK_ARCHIVE_FILE_NAME
CPACK_ARCHIVE_<component>_FILE_NAME
- Package file name without extension which is added automatically depending
- on the archive format.
-
- * Mandatory : YES
- * Default : ``<CPACK_PACKAGE_FILE_NAME>[-<component>].<extension>`` with
- spaces replaced by '-'
+ Package file name without extension. The extension is determined from the
+ archive format (see list above) and automatically appended to the file name.
+ The default is ``<CPACK_PACKAGE_FILE_NAME>[-<component>]``, with spaces
+ replaced by '-'.
.. variable:: CPACK_ARCHIVE_COMPONENT_INSTALL
- Enable component packaging for CPackArchive
-
- * Mandatory : NO
- * Default : OFF
-
- If enabled (ON) multiple packages are generated. By default a single package
- containing files of all components is generated.
+ Enable component packaging. If enabled (ON), then the archive generator
+ creates multiple packages. The default is OFF, which means that a single
+ package containing files of all components is generated.