Accessing "install" arguments from cpack External generator

Dear list,

In the CPACK_EXTERNAL_PACKAGE_SCRIPT, how can you query the arguments passed to the “install” command?

For example, for every file in the “staging” directory, how can you query which PERMISSIONS have been passed to the “install” command?

The use-case is that with cross compiling on a Windows host, the permissions are not available in the filesystem in “staging”.

Next question/feature request: There’s no way to set the OWNER and GROUP in the “install” command, in addition to PERMISSIONS.

Doesn’t anyone else need this?

Is this usually solved by some extra configuration, independent from the settings in the “install” command, by custom External cpack scripts?

Or do maintainers of linux distributions want to do that themselves, and that’s why they don’t want upstream authors to do it in cmake build configuration?

Both topics interact… if there would be a way to configure the USER, it would be even more difficult to do that in “staging” (even without cross compiling on Windows), because
the package build would usually not be run as root, so it wouldn’t be able to set the user in “staging”.



Now that I have signed up to discourse instead of just reading the old mailing list, I see that someone else was asking a related question recently…