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

Kyle Edwards kyle.edwards at kitware.com
Thu Oct 3 16:23:47 EDT 2019


On Thu, 2019-10-03 at 16:15 -0400, stefan wrote:
> I'm trying to generate (debian) packages for a project of mine using
> cmake. I need to generate multiple components ("runtime",
> "development", etc.). What is the expected way to have the
> "development" package depend on the "runtime" package ?
> I'v been trying to play with the
> CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS setting, but so far wasn't able
> to have my packages contain the expected dependencies in their
> metadata.
> Thanks,

Please take a look at cpack_add_component():

https://cmake.org/cmake/help/latest/module/CPackComponent.html

Kyle


More information about the CMake mailing list