In one of my projects, configured with CMake, I can see that the reulting build.ninja
has lines like this (emphasis mine):
build CMakeFiles/package.util: CUSTOM_COMMAND all
COMMAND = cd /home/abertulli/<project_root>/<build_directory> && /usr/bin/cpack --config ./CPackConfig.cmake
DESC = Run CPack packaging tool... ## <-- NOTE HERE
pool = console
restat = 1
Pheraps this does what you'd like?