Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,198
    • Issues 3,198
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 16
    • Merge Requests 16
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • CMake
  • CMakeCMake
  • Issues
  • #21697

Closed
Open
Opened Jan 12, 2021 by Florian Steinhardt@fcs

CPackIFW: Documentation: how to set a component dependency with a specific version (or change code to accept the short identifier variant too)

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.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: cmake/cmake#21697