Tutorial: Set CPACK_GENERATOR in Step 9

In addition to CPACK_SOURCE_GENERATOR also set CPACK_GENERATOR.
This commit is contained in:
betsy.mcphail
2024-05-09 14:03:06 -04:00
parent 760ad9bcc7
commit baf6a37ffa
5 changed files with 11 additions and 4 deletions

View File

@@ -89,6 +89,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_GENERATOR "TGZ")
set(CPACK_SOURCE_GENERATOR "TGZ")
include(CPack)

View File

@@ -23,8 +23,9 @@ 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. The :variable:`CPACK_SOURCE_GENERATOR` variable
selects a file format for the source package.
directory for this step. The :variable:`CPACK_GENERATOR` and
:variable:`CPACK_SOURCE_GENERATOR` variables select the generators used for
binary and source installations, respectively.
Finally we include the :module:`CPack module <CPack>` which will use these
variables and some other properties of the current system to setup an
@@ -38,8 +39,9 @@ binary directory run:
cpack
To specify the generator, use the :option:`-G <cpack -G>` option. For multi-config builds,
use :option:`-C <cpack -C>` to specify the configuration. For example:
To specify the binary generator, use the :option:`-G <cpack -G>` option. For
multi-config builds, use :option:`-C <cpack -C>` to specify the configuration.
For example:
.. code-block:: console

View File

@@ -72,5 +72,6 @@ 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_GENERATOR "TGZ")
set(CPACK_SOURCE_GENERATOR "TGZ")
include(CPack)

View File

@@ -80,5 +80,6 @@ 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_GENERATOR "TGZ")
set(CPACK_SOURCE_GENERATOR "TGZ")
include(CPack)

View File

@@ -85,6 +85,8 @@ 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_GENERATOR "TGZ")
set(CPACK_SOURCE_GENERATOR "TGZ")
include(CPack)
# install the configuration targets