CPack and post-build actions


I’d like to propose to add CPACK_POST_BUILD_SCRIPTS variable (plural form to be intact w/ CPACK_INSTALL_COMMANDS, _SCRIPTS & etc). It’s a list of CMake scripts to perform right after CPack has built packages (per generator or altogether is discussible).

What I wanted to solve is to sign RPM/DEB packages built by cmake ... --target package that is part of my CTest run.

PS. I’m ready to work on MR for this feature.

Yes, post-package actions sounds fine to me.

See also CMake Issue 19077 which could benefit from pre-package actions in the staged install directory just before running the packager.

1 Like