Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97478

Configuring CMake based application with QtQuick fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 6.2.0, 6.2.1
    • Fix Version/s: 6.2.1, 6.3.0 Alpha
    • Component/s: Build System: CMake
    • Labels:
      None
    • Platform/s:
      WebAssembly
    • Commits:
      aad4158959890b72afdd062614c1142c100c65b5 (qt/qtbase/dev) 690ca837581cdf8a932a7be59e3812f2f70d4aaa (qt/qtbase/6.2) 7ce23e5d9234dd5717e34a2140fdd696f5198915 (qt/qtbase/6.2.1)

      Description

      I installed the Qt 6.2.1 snapshot (qt5 SHA a0cda005ef0f38486c08465356ec373c10234567)

      Configuring a simple CMake based application that uses QtQuick (e.g. https://git.qt.io/playground/qtcreator-bug-snippets/-/tree/master/QTCREATORBUG-25030/qtquickcontrols2 ) fails like so:

      Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/Users/alportal/Documents/untitled89 -B C:/Users/alportal/Documents/build-untitled89-Qt_6_2_1_WebAssembly-Debug -GNinja "-DCMAKE_BUILD_TYPE:STRING=Debug" "-DQT_QMAKE_EXECUTABLE:STRING=C:/Qt/6.2.1/wasm_32/bin/qmake.bat" "-DCMAKE_PREFIX_PATH:STRING=C:/Qt/6.2.1/wasm_32" "-DCMAKE_C_COMPILER:STRING=C:/Users/alportal/dev/emsdk-2.0.14/upstream/emscripten/emcc.bat" "-DCMAKE_CXX_COMPILER:STRING=C:/Users/alportal/dev/emsdk-2.0.14/upstream/emscripten/em++.bat" "-DCMAKE_TOOLCHAIN_FILE:PATH=C:/Qt/6.2.1/wasm_32/lib/cmake/Qt6/qt.toolchain.cmake" in C:\Users\alportal\Documents\build-untitled89-Qt_6_2_1_WebAssembly-Debug.
      – Performing Test HAVE_STDATOMIC
      – Performing Test HAVE_STDATOMIC - Success
      – Found WrapAtomic: TRUE
      – Using Qt bundled PCRE2.
      – Found WrapPCRE2: TRUE
      – Performing Test HAVE_GETTIME
      – Performing Test HAVE_GETTIME - Success
      – Found WrapRt: TRUE
      – Found GLESv2: ON
      – Performing Test HAVE_EGL
      – Performing Test HAVE_EGL - Success
      – Found EGL: C:/Users/alportal/dev/emsdk-2.0.14/upstream/emscripten/system/include (found version "1.5")
      – Using Qt bundled PNG.
      – Found WrapPNG: TRUE
      – Using Qt bundled Harfbuzz.
      – Found WrapHarfbuzz: TRUE
      – Using Qt bundled Freetype.
      – Found WrapFreetype: TRUE
      – Found GLESv2: ON
      CMake Warning at C:/Qt/Tools/CMake_64/share/cmake-3.21/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
      Found package configuration file:

      C:/Qt/6.2.1/wasm_32/lib/cmake/Qt6Qml/Qt6QmlConfig.cmake

      but it set Qt6Qml_FOUND to FALSE so package "Qt6Qml" is considered to be
      NOT FOUND. Reason given by package:

      The following imported targets are referenced, but are missing:
      Qt6::qtquicktemplates2plugin

      Call Stack (most recent call first):
      C:/Qt/6.2.1/wasm_32/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
      C:/Qt/6.2.1/wasm_32/lib/cmake/Qt6Quick/Qt6QuickDependencies.cmake:91 (_qt_internal_find_dependencies)
      C:/Qt/6.2.1/wasm_32/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake:40 (include)
      C:/Qt/6.2.1/wasm_32/lib/cmake/Qt6/Qt6Config.cmake:176 (find_package)
      CMakeLists.txt:8 (find_package)

      CMake Warning at C:/Qt/6.2.1/wasm_32/lib/cmake/Qt6/Qt6Config.cmake:176 (find_package):
      Found package configuration file:

      C:/Qt/6.2.1/wasm_32/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake

      but it set Qt6Quick_FOUND to FALSE so package "Qt6Quick" is considered to
      be NOT FOUND. Reason given by package:

      Qt6Quick could not be found because dependency Qt6Qml could not be found.

      Call Stack (most recent call first):
      CMakeLists.txt:8 (find_package)

      CMake Error at CMakeLists.txt:8 (find_package):
      Found package configuration file:

      C:/Qt/6.2.1/wasm_32/lib/cmake/Qt6/Qt6Config.cmake

      but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
      FOUND. Reason given by package:

      Failed to find Qt component "Quick".

      Expected Config file at
      "C:/Qt/6.2.1/wasm_32/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake" exists

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              alexandru.croitor Alexandru Croitor
              Reporter:
              portale Alessandro Portale
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes