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

Cannot find Qt6QmlTools_DIR automatically

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 6.7.0
    • Build System: CMake
    • None
    • Linux/X11, Windows

    Description

      Qt6QmlTools_DIR is not automatically detected when specifying Qt’s path with find_package(Qt6 REQUIRED COMPONENTS Core Quick PATHS \${qtdir}) necessitating manual path specification.

      The issue is new in verstion 6.7.0.

      To replicate, download the attachment and run the cmake command.

      Error log:

      CMake Warning at /usr/local/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package):
        By not providing "FindQt6QmlTools.cmake" in CMAKE_MODULE_PATH this project
        has asked CMake to find a package configuration file provided by
        "Qt6QmlTools", but CMake did not find one.  Could not find a package configuration file provided by "Qt6QmlTools"
        (requested version 6.7.0) with any of the following names:    Qt6QmlToolsConfig.cmake
          qt6qmltools-config.cmake  Add the installation prefix of "Qt6QmlTools" to CMAKE_PREFIX_PATH or set
        "Qt6QmlTools_DIR" to a directory containing one of the above files.  If
        "Qt6QmlTools" provides a separate development package or SDK, be sure it
        has been installed.
      Call Stack (most recent call first):
        /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6QuickTools/Qt6QuickToolsDependencies.cmake:12 (find_dependency)
        /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6QuickTools/Qt6QuickToolsConfig.cmake:36 (include)
        /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:65 (find_package)
        /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6Quick/Qt6QuickDependencies.cmake:37 (_qt_internal_find_tool_dependencies)
        /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake:43 (include)
        /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:167 (find_package)
        CMakeLists.txt:13 (find_package)
      CMake Warning at /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:65 (find_package):
        Found package configuration file:    /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6QuickTools/Qt6QuickToolsConfig.cmake  but it set Qt6QuickTools_FOUND to FALSE so package "Qt6QuickTools" is
        considered to be NOT FOUND.  Reason given by package:  Qt6QuickTools could not be found because dependency Qt6QmlTools could not
        be found.Call Stack (most recent call first):
        /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6Quick/Qt6QuickDependencies.cmake:37 (_qt_internal_find_tool_dependencies)
        /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake:43 (include)
        /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:167 (find_package)
        CMakeLists.txt:13 (find_package)
      CMake Warning at /home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:167 (find_package):
        Found package configuration file:    /home/warindy/Develop/dep/qt/6.7.0/gcc_64/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 Qt6QuickTools could not be
        found.  Configuring with --debug-find-pkg=Qt6QuickTools might reveal details why
        the package was not found.  Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some
        of the path variables that find_package uses to try and find the package.Call Stack (most recent call first):
        CMakeLists.txt:13 (find_package)
      CMake Error at CMakeLists.txt:13 (find_package):
        Found package configuration file:    /home/warindy/Develop/dep/qt/6.7.0/gcc_64/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 required Qt component "Quick".  Expected Config file at
        "/home/warindy/Develop/dep/qt/6.7.0/gcc_64/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake"
        exists  Configuring with --debug-find-pkg=Qt6Quick might reveal details why the
        package was not found.  Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some
        of the path variables that find_package uses to try and find the package.-- Configuring incomplete, errors occurred! 

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              warindy yi wang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes