Skip to content

CPack: allow custom file extension in archive generator

Currently file extensions used by CPack are hardcoded. This MR allows setting a custom archive extension with or without leading dot through new variable CPACK_ARCHIVE_OUTPUT_EXTENSION.

My primary goal was to be able to generate IPA file (standard format to distribute iOS/tvOS apps which is just a zip with special structure) with CPack directly, as currently I have to perform manual renaming after running cpack. See example from my project: https://github.com/kambala-decapitator/vcmi/commit/476b8e396fb14f3f66ef0ad73b60ab53946b7722

Another use case would be e.g. using .txz instead of .tar.xz.

If you find that this feature makes sense, I'll proceed with adding documentation change.

Fixes: #23889 (closed)

Edited by Brad King

Merge request reports

Loading