CPack: Introduce pre- and post- build actions

CPack learned the `CPACK_PRE_BUILD_SCRIPTS`, `CPACK_POST_BUILD_SCRIPTS`,
and `CPACK_PACKAGE_FILES` variables.

The first two are lists of scripts to perform
- after pre-install files into a staging directory and before
  producing the resulting packages
- after produsing the packages

The post-build script(s) also get the list of actually produced
packages in the `CPACK_PACKAGE_FILES`.

Issue: #19077
This commit is contained in:
Alex Turbov
2020-06-03 02:10:08 +08:00
committed by Brad King
parent 43b10e2411
commit 915409af49
10 changed files with 104 additions and 6 deletions
+15
View File
@@ -386,6 +386,21 @@ The following variables are for advanced uses of CPack:
select the CPack generator(s) to be used when building the ``package``
target or when running :manual:`cpack <cpack(1)>` without the ``-G`` option.
.. variable:: CPACK_PRE_BUILD_SCRIPTS
List of CMake scripts to execute after CPack has installed the files to
be packed into a staging directory and before producing the result
packages.
.. variable:: CPACK_POST_BUILD_SCRIPTS
List of CMake scripts to execute after CPack has produced the result
packages and before copying them back to a build directory.
.. variable:: CPACK_PACKAGE_FILES
List of resulting package files passed to the ``CPACK_POST_BUILD_SCRIPTS``.
#]=======================================================================]
# Define this var in order to avoid (or warn) concerning multiple inclusion