CPack Archive Generator TOPLEVEL_DIRECTORY Name

When creating e.g. a ZIP file for all installed binaries using the CPack Archive Generator, there appears to be no way to define the name of the toplevel directory within the created archive.

One can only enable/disable the creation of the folder via the CPACK_INCLUDE_TOPLEVEL_DIRECTORY variable.

CPACK_PACKAGE_FILE_NAME sets both the archive name and the toplevel directory name.

The variables CPACK_ARCHIVE_FILE_NAME and CPACK_TOPLEVEL_TAG appear to have no effect.

Is there a way to set the toplevel directory name?

What I intend to do is create several configuration specific archive names, without the one overriding the other when put into the same directory. When extracting, the contents of all archives should be merged into a single folder with the name of the toplevel directory.

Consider the following archive/folder structure:

my-project-1.0.0-win64-debug.zip
 -> my-project-1.0.0-win64
 --> bin
 ---> debug
 ----> my-application.exe

my-project-1.0.0-win64-release.zip
 -> my-project-1.0.0-win64
 --> bin
 ---> release
 ----> my-application.exe

C:\Program Files\my-project-1.0.0-win64
 -> bin
 --> debug
 ---> my-application.exe
 --> release
 ---> my-application.exe

This sounds like it probably needs a feature request to me (but it makes sense as well). Please file an issue to track it.

I created an issue: 22946.