[CMake] CPack: Create debian packge for each sub-project

Craig Scott craig.scott at crascit.com
Thu Nov 30 23:41:03 EST 2017


On Fri, Dec 1, 2017 at 11:15 AM, Domen Vrankar <domen.vrankar at gmail.com>
wrote:

> 2017-11-29 17:07 GMT+01:00 DKLind <davidklind at gmail.com>:
>
>> I have finally found time to work on a patch so
>> CPACK_DEBAIN_<COMPONENT>_PACKAGE_VERSION is recognized. I am amazed how
>> simple the fix actually is.
>>
>> I plan on submitting a formal patch soon for Debian and RPM. I don't know
>> anything about other CMake packaging features that might benefit from this
>> patch.
>>
>
> Hi,
>
> I've also been working on a bit larger feature extension that would
> possibly be of interest to you: https://gitlab.kitware.com/
> cmake/cmake/merge_requests/1545
>
> I haven't decided on implementing per component versioning since it makes
> no sense to version different components of the same release differently
> unless they are a separate project which requires more variable overrides
> and manual setting of components - ExternalProject seems a better
> alternative in such cases. Maybe your solution can convince me otherwise.
>

An example where per-component versions would be really useful is if you
have one large build that produces multiple products (i.e. one git repo and
one CMake build). You may want to be able to create a release package for
each product, but if each product has its own distinct version number, then
you currently can't quite do it with CMake for some package types. I have
exactly this situation at work at the moment. In one project, I get away
with it because the release packages are tar balls so I just provide a
custom name that embeds the version number for each product using
CPACK_ARCHIVE_<component-name>_FILE_NAME. But I have other projects which
produce RPMs and for those I don't currently have a solution.




-- 
Craig Scott
Melbourne, Australia
https://crascit.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20171201/6769fa91/attachment.html>


More information about the CMake mailing list