Choice of generator for CPack

I’d like to package an application on Windows and Linux, which is currently built and installed (on the build machine) using CMake.

For the installation on the target machine to work correctly on Windows, there are several environment variables that need to be set (though this is not so important on Linux, as the application is normally invoked via a shell script). Each of the candidate package frameworks I could choose (NSIS, WiX or QtIFW) seem to provide a means of setting environment variables on installation when used ‘natively’, but I’m puzzled how to invoke this behaviour when using them via a CPack generator.

Is there a part of the documentation, related to this, that I’ve missed?

I suspect that each of them deal with it through any custom scripts you can write which CPack should be then able to incorporate into its process. The documentation for how the scripts work are best handled by the packaging tool itself. For how to integrate into CPack, the docs for the CPack generator in question (I’d get a link, but seems to be not responding right now :confused: ).