mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Tutorial: Set CPACK_GENERATOR in Step 9
In addition to CPACK_SOURCE_GENERATOR also set CPACK_GENERATOR.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user