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

qt5.git add_subdirectory order is computed incorrectly

    XMLWordPrintable

Details

    • Linux/X11
    • 8a94d1e294 (qt/qt5/dev) 8a94d1e294 (qt/tqtc-qt5/dev) a12a924b30 (qt/tqtc-qt5/6.2) 0ec83c2903 (qt/qt5/6.3) 0ec83c2903 (qt/tqtc-qt5/6.3) 0ec83c2903 (qt/qt5/6.3.1)

    Description

      I saw some suspicious log in the Qt config output:

      – The following OPTIONAL packages have not been found:

      ...

      • Qt6Gamepad (required version >= 6.2.0)
      • Qt6Multimedia (required version >= 6.2.0)

      ...

      • Qt6QmlCompilerPlus

      I'm not sure if this really impacts any build output though. I tracked down a bit and found the root cause may be the add_subdirectory() order issue in cmake files. Here is my analysis:

      This line in qt5/qt3d/CMakeLists.txt:

      find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS
      Concurrent Widgets Qml Quick Gamepad OpenGL Multimedia)

      was called before the cmake config files of Qt6Gamepad and Qt6Multimedia are installed into: <build directory>/qtbase/lib/cmake

      So it cannot find the corresponding module config file, as the cmake log output (with --debug-find) showed:

      find_package considered the following locations for the Config module:

      /nv/qt_output/qtbase/lib/cmake/Qt6MultimediaConfig.cmake
      /nv/qt_output/qtbase/lib/cmake/qt6multimedia-config.cmake
      /nv/qt_output/qtbase/lib/cmake/Qt6MultimediaConfig.cmake
      /nv/qt_output/qtbase/lib/cmake/qt6multimedia-config.cmake
      /nv/qt_output/qtbase/lib/cmake/Qt6MultimediaConfig.cmake
      /nv/qt_output/qtbase/lib/cmake/qt6multimedia-config.cmake

      The file was not found.

       

      Even if this is harmless and gamepad and multimedia modules are going to be built anyway, it's better to be eliminated from the "not found list" which is very confusing.

      Attachments

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              jcl jcl
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes