Setting environment variables when using CPACK

I’m trying to work out how I can build an installation package using CPack that will set environment variables and system paths (not only the main system path, but paths to plugins etc.) when the installation takes place.

I’ve previously done this directly using Wix; and I can find guidance on the NSIS help pages for how to do it natively; and I presume that the Qt installer must be capable of this as well; but I can’t find any way of controlling the process from CPack.

The nearest I can find in the CPack documentation is the CPACK_NSIS_MODIFY_PATH, but that only allows the system path to be modified and in any case it only works with NSIS - there doesn’t seem to be an equivalent for other generators.

Am I simply missing something? If so, where should I look?

I believe that the Wix CPack support allows for arbitrary Wix scripts to be used. Beyond that, I don’t know much about Wix.