Allow install COMPONENT name to completely define the CPack package name
I'm using the ZIP/TGZ CPack generators to package a collection of executables that share a set of libraries so it makes sense to keep them in the same CMake project. I would like to be able to provide independent package names for each component, without the top-level project name being included.
The closest I've been to achieving this goal is by using the install command's COMPONENT name to set the desired name of my packages. Then, set CPACK_PACKAGE_FILE_NAME to an empty string. This leaves me with a dash at the beginning of the package name, which was the separator between package name and component. If that dash were to disappear when CPACK_PACKAGE_FILE_NAME is an empty string, I'd be set!
The documentation for the IGNORE option of CPACK_COMPONENTS_GROUPING states that it, "creates one package per component" so there's already a precedent for components to be treated independently rather than parts of one installer package.
So, if...
- install COMPONENT is set
- CPACK_COMPONENTS_GROUPING is set to IGNORE
- CPACK_PACKAGE_FILE_NAME is an empty string
Package name is purely defined by COMPONENT
What do you think?