Tutorial: Improve Step 7

* Update directions
This commit is contained in:
Betsy McPhail 2019-07-18 15:40:25 -04:00 committed by Brad King
parent a36731c634
commit 61d4d990d6
2 changed files with 17 additions and 8 deletions

View File

@ -28,7 +28,7 @@ target_link_libraries(Tutorial PUBLIC ${EXTRA_LIBS})
# so that we will find TutorialConfig.h
target_include_directories(Tutorial PUBLIC
"${PROJECT_BINARY_DIR}"
)
)
# add the install targets
install(TARGETS Tutorial DESTINATION bin)

View File

@ -541,28 +541,37 @@ That is all there is to it. We start by including
``InstallRequiredSystemLibraries``. This module will include any runtime
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 makes use of the
variables we set earlier in this tutorial. Finally we include the CPack
module which will use these variables and some other properties of the system
you are on to setup an installer.
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.
Finally we include the CPack module which will use these variables and some
other properties of the current system to setup an installer.
The next step is to build the project in the usual manner and then run
CPack on it. To build a binary distribution you would run:
CPack on it. To build a binary distribution, from the binary directory run:
.. code-block:: console
cpack
To specify the generator, use the ``-G`` option. For multi-config builds, use
``-C`` to specify the configuration. For example:
.. code-block:: console
cpack -G ZIP -C Debug
To create a source distribution you would type:
.. code-block:: console
cpack -C CPackSourceConfig.cmake
cpack --config CPackSourceConfig.cmake
Alternatively, run ``make package`` or right click the ``Package`` target and
``Build Project`` from an IDE.
Run the installer executable found in the binary directory. Then run the
Run the installer found in the binary directory. Then run the
installed executable and verify that it works.
Adding Support for a Dashboard (Step 8)