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

stefan stefan at seefeld.name
Fri Oct 4 14:20:53 EDT 2019


On 2019-10-03 5:24 p.m., Kyle Edwards wrote:
> On Thu, 2019-10-03 at 17:08 -0400, stefan wrote:
>> Yes, that is exactly what I'm trying to do, but it doesn't seem to
>> have any effect. That is, `dpkg --info ...` doesn't list the
>> additional dependency, and correspondingly, running `apt-get install
>> ...` on the component package file will install the package without
>> first installing the prerequisite component.
>> Consider this declaration:
>>    set(CPACK_COMPONENTS_ALL runtime development mstool)
>> If I now write
>>    set(CPACK_COMPONENT_DEVELOPMENT_DEPENDS runtime)
>> I will see no effect. That is, the "development" package still does
>> not depend on the "runtime" package.
>> So I try this:
>>    set(CPACK_COMPONENT_DEVELOPMENT_DEPENDS RUNTIME)
>> in case capitalization is required. Now the "runtime" component seems
>> to get packaged twice (as per the cmake logs), but still no correct
>> dependencies.
>> Is it time for a bug report ?
> Please send us a minimal CMakeLists.txt that reproduces the issue.

Sure. Here it is. The relevant line part is line 5. Please let me know 
what I'm doing wrong.

Thanks,

Stefan

--

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191004/10d1d73e/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/20191004/10d1d73e/attachment.png>
-------------- next part --------------
project(demo)
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "joe random")
set(CPACK_COMPONENTS_ALL runtime dev)
set(CPACK_COMPONENT_DEV_DEPENDS runtime) # <- this line doesn't seem to have any effect
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
include(CPack)

file(WRITE a "runtime")
file(WRITE b "dev")

install(FILES a DESTINATION share COMPONENT runtime)
install(FILES b DESTINATION share COMPONENT dev)


More information about the CMake mailing list