Skip to content

[package] qt/6.8.x+: qtgraphs cmake target missing #29212

@StofflR

Description

@StofflR

Description

With qt 6.8.x+ qt introduced QtGraphs. The conan recipe already included the submodule in conanfile.py but the corresponding _create_module call in the package_info method is missing. Therefore when trying to build a an application using QtGraphs the corresponding Cmake Targets are missing.

Package and Environment Details

  • Package Name/Version: qt/6.8.x+
  • Operating System+version: any
  • Compiler+version: any
  • Docker image: any
  • Conan version: any
  • Python version: any

Conan profile

[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.version=193
os=Windows

Steps to reproduce

Building the qt package with:
conan create . --version=6.8.3 -o qt/*:qtgraphs=True

and consuming it in a CMake project with:

find_package(
    Qt6
    COMPONENTS 
               Graphs
    REQUIRED
)

and:

target_link_libraries(
    ${target}
    PUBLIC 
           Qt6::Graphs
)

Logs

Click to expand log
[cmake]   Target "target" links to:
[cmake] 
[cmake]     Qt6::Graphs
[cmake] 
[cmake]   but the target was not found.  Possible reasons include:
[cmake] 
[cmake]     * There is a typo in the target name.
[cmake]     * A find_package call is missing for an IMPORTED target.
[cmake]     * An ALIAS target is missing.
[cmake] 
[cmake] 
[cmake] 
[cmake] CMake Error at src/to/target/CMakeLists.txt (target_link_libraries):
[cmake]   Target "subTarget" links to:
[cmake] 
[cmake]     Qt6::Graphs
[cmake] 
[cmake]   but the target was not found.  Possible reasons include:
[cmake] 
[cmake]     * There is a typo in the target name.
[cmake]     * A find_package call is missing for an IMPORTED target.
[cmake]     * An ALIAS target is missing.
[cmake] 
[cmake] 
[cmake] ```

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions