CPackIFW: Component DEPENDS with version but no operator drops the version part
I needed a couple of hours today to realize how to set a component dependency to another component with a specific version using CPackIFW.
The manual (https://cmake.org/cmake/help/latest/module/CPackIFW.html) only says:
DEPENDS | DEPENDENCIES
list of dependency component or component group identifiers in QtIFW style.
A QtIFW style dependency component could be for example
<Dependencies>main-1.0.0</Dependencies>
or
<Dependencies>main-=1.0.0</Dependencies>
(both versions are valid for QtIFW: https://doc.qt.io/qtinstallerframework/ifw-component-description.html#component-dependencies)
CPackIFW seems to need the long version, using the short version
cpack_ifw_configure_component(
component_name
DEFAULT FALSE
DEPENDS main-1.0.0
)
resulted in the version number just being dropped and the cpack generated dependency in the component package.xml for binarycreator looks like this:
<Dependencies>main</Dependencies>
Only main-=1.0.0 was working as expected.
Having an example in the documentation or accepting the short version (main-1.0.0) would have made things a lot more transparent for me.
I was using cpack 3.19.2 running on Ubuntu Linux x86 64 bit.