mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
Merge topic 'tutorial-cpack-source-archive'
39c410624aTutorial: in step 7, disambiguate installed/source archive44c527bc63Tutorial: Package only one source archive Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6765
This commit is contained in:
@@ -88,6 +88,7 @@ include(InstallRequiredSystemLibraries)
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${Tutorial_VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${Tutorial_VERSION_MINOR}")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
include(CPack)
|
||||
|
||||
# install the configuration targets
|
||||
|
||||
@@ -23,7 +23,8 @@ libraries that are needed by the project for the current platform. Next we set
|
||||
some CPack variables to where we have stored the license and version
|
||||
information for this project. The version information was set earlier in this
|
||||
tutorial and the ``license.txt`` has been included in the top-level source
|
||||
directory for this step.
|
||||
directory for this step. The :variable:`CPACK_SOURCE_GENERATOR` variable
|
||||
selects a file format for the source package.
|
||||
|
||||
Finally we include the :module:`CPack module <CPack>` which will use these
|
||||
variables and some other properties of the current system to setup an
|
||||
@@ -44,7 +45,11 @@ To specify the generator, use the ``-G`` option. For multi-config builds, use
|
||||
|
||||
cpack -G ZIP -C Debug
|
||||
|
||||
To create a source distribution you would type:
|
||||
For a list of available generators, see :manual:`cpack-generators(7)` or call
|
||||
``cpack --help``. An :cpack_gen:`archive generator <CPack Archive Generator>`
|
||||
like ZIP creates a compressed archive of all *installed* files.
|
||||
|
||||
To create an archive of the *full* source tree you would type:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
|
||||
@@ -70,4 +70,5 @@ include(InstallRequiredSystemLibraries)
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${Tutorial_VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${Tutorial_VERSION_MINOR}")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
include(CPack)
|
||||
|
||||
@@ -78,4 +78,5 @@ include(InstallRequiredSystemLibraries)
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${Tutorial_VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${Tutorial_VERSION_MINOR}")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
include(CPack)
|
||||
|
||||
@@ -70,4 +70,5 @@ include(InstallRequiredSystemLibraries)
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${Tutorial_VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${Tutorial_VERSION_MINOR}")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
include(CPack)
|
||||
|
||||
@@ -69,4 +69,5 @@ include(InstallRequiredSystemLibraries)
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${Tutorial_VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${Tutorial_VERSION_MINOR}")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
include(CPack)
|
||||
|
||||
Reference in New Issue
Block a user