Skip to content

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 producing the packages

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

See-also: https://discourse.cmake.org/t/cpack-and-post-build-actions/1296/2
Issue: #19077
Topic-rename: cpack-pre-and-post-scripts

Edited by Brad King

Merge request reports