[CMake] HOWTO declare component inter-dependencies in multi-component packages

stefan stefan at seefeld.name
Thu Oct 3 16:42:50 EDT 2019


On 2019-10-03 4:37 p.m., Kyle Edwards wrote:
> On Thu, 2019-10-03 at 16:30 -0400, stefan wrote:
>> Hi Kyle,
>> thanks for the quick followup.
>> On 2019-10-03 4:23 p.m., Kyle Edwards wrote:
>>> Please take a look at cpack_add_component():
>>> https://cmake.org/cmake/help/latest/module/CPackComponent.html
>> I'm not sure what specifically I should be looking for.
>> In general my setup is working fine, i.e. my build generates multiple
>> packages as expected. They even contain dependencies to external
>> packages, as I have set as per the available variables. What I
>> haven't been able to express is the component inter-dependency. That
>> is, I haven't found a way to make my "development" package depend on
>> the "runtime" package (generated from the same build process).
>> Sorry for being obtuse.
> In particular, please look at the DEPENDS argument of
> cpack_add_component():
>
> "DEPENDS lists the components on which this component depends. If this
> component is selected, then each of the components listed must also be
> selected. The dependency information is encoded within the installer
> itself, so that users cannot install inconsistent sets of components."

My project is already using this style:

   set(CPACK_COMPONENTS_ALL runtime development mstool)

i.e. all components are already defined. All that's missing is the 
declaration of their (inter-)dependencies.

Are you suggesting I should *not* use CPACK_COMPONENTS_ALL, but instead 
call `cpack_add_component()` instead ?

Thanks,


Stefan

--

       ...ich hab' noch einen Koffer in Berlin...
     

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191003/a0458e7d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.png
Type: image/png
Size: 1478 bytes
Desc: not available
URL: <https://cmake.org/pipermail/cmake/attachments/20191003/a0458e7d/attachment.png>


More information about the CMake mailing list