I have the following situation and am proposing to submit a pull request with a solution, but thought I’d post it here for discussion, in case anyone has any comments, since I’ve not contributed to cmake before.
The situation is as follows:
I have a large project which consists of a set of libraries, let’s call it “MySDK”, a main binary, let’s call it “MyApp”, and a bunch of command line utilities based on “MySDK” with various names.
I’ve grouped these into “components”. The obvious “MySDK”, “MyApp”, and a component called “MyUtils” with all the command line utilities.
For Linux platforms, I create separate packages using CPack. i.e. I have a mysdk-1.2.3.rpm, myapp-1.2.3.rpm, myutils-1.2.3.rpm, with appropriate dependencies. This is trivial to get working by settinig CPACK_COMPONENTS_GROUPING to “ONE_PER_GROUP”. All works well.
For Windows, using the NSIS generator, I want to include all the components in one package. Again this is trivial by setting CPACK_COMPONENTS_GROUPING to “ALL_COMPONENTS_IN_ONE”. However, the current CPack implementation insists on showing the “component selection” page, even though there are no selectable components because they’re all marked as “HIDDEN”. I don’t want the user to be able to select them on Windows, they need everything.
I’ve looked into the CPack code and hiding the “component selection” page is trivial. Therefore I am proposing to add a “CPACK_NSIS_IGNORE_COMPONENTS_PAGE” setting, which would simply hide the page, irrespective of other settings. I think the name makes sense as there is already “CPACK_NSIS_IGNORE_LICENSE_PAGE”.
I’ll probably submit a pull request tomorrow and I’m sure it’ll go through the usual review but thought I’d say hello and put it out there for discussion just in case anyone has any comments, since the CONTRIBUTING doc suggest doing so!