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

Kyle Edwards kyle.edwards at kitware.com
Thu Oct 3 16:59:46 EDT 2019


On Thu, 2019-10-03 at 16:42 -0400, stefan wrote:
> 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,

That's how I prefer to do it. Alternatively, you could set
CPACK_COMPONENT_<compName>_DEPENDS directly (that's all that
cpack_add_component() is doing.)

Kyle


More information about the CMake mailing list