Procházet zdrojové kódy

Tutorial: Set CPACK_GENERATOR in Step 9

In addition to CPACK_SOURCE_GENERATOR also set CPACK_GENERATOR.
betsy.mcphail před 1 rokem
rodič
revize
baf6a37ffa

+ 1 - 0
Help/guide/tutorial/Complete/CMakeLists.txt

@@ -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)
 

+ 6 - 4
Help/guide/tutorial/Packaging an Installer.rst

@@ -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
 

+ 1 - 0
Help/guide/tutorial/Step10/CMakeLists.txt

@@ -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)

+ 1 - 0
Help/guide/tutorial/Step11/CMakeLists.txt

@@ -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)

+ 2 - 0
Help/guide/tutorial/Step12/CMakeLists.txt

@@ -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