conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
966 stars 1.77k forks source link

[package] qt/6.4.2: `qt_add_qml_module` not found #20450

Open evilenzo opened 1 year ago

evilenzo commented 1 year ago

Description

Trying to build qt with qml, getting such error when trying to use qt_add_qml_module in my CMakeLists.txt

[cmake] -- Configuring incomplete, errors occurred!
[cmake] CMake Error at CMakeLists.txt:83 (qt_add_qml_module):
[cmake]   Unknown CMake command "qt_add_qml_module".

Package and Environment Details

Conan profile

Host profile: [settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=23 compiler.runtime=dynamic compiler.runtime_type=Release compiler.version=193 os=Windows

Build profile: [settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=23 compiler.runtime=dynamic compiler.runtime_type=Release compiler.version=193 os=Windows

Steps to reproduce

from conan import ConanFile, tools
from conan.tools.cmake import cmake_layout, CMake

class HeatEngine(ConanFile):
    settings = "os", "compiler", "build_type", "arch"

    generators = "CMakeDeps", "CMakeToolchain"

    def layout(self):
        cmake_layout(self)

    def requirements(self):
        self.requires("qt/6.4.2")
        self.requires("brotli/1.1.0", override=True)
        self.requires("vsg/1.0.3")
        self.requires("tl-optional/1.1.0")
        self.requires("tl-expected/1.1.0")
        self.requires("fmt/10.1.1")

Install and try to use qt_add_qml_module

Logs

IDK which logs I should provide...

ericLemanissier commented 1 year ago

@evilenzo you probably want to enable option qt/*:qtdeclarative=True If it still fails, please post the conanfile.py, CMakelists.txt and full console log of the failure