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

Qt6HostInfo package loading fails if QT_REPO_MODULE_VERSION is not 6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 6.1.0 Alpha
    • 6.0.0
    • Build System: CMake
    • None

      bb4437e72487d9f35c4cc93bff6acefc71871c68 in qtqa changed QT_REPO_MODULE_VERSION to 1.0.0.

      With that, qt5.git integrations for cross-compiling configs failed, because in QtSetup.cmake we do

          find_package(Qt${PROJECT_VERSION_MAJOR}HostInfo
                       CONFIG
                       REQUIRED
                       PATHS "${QT_HOST_PATH}"
                             "${QT_HOST_PATH_CMAKE_DIR}"
                       NO_CMAKE_FIND_ROOT_PATH
                       NO_DEFAULT_PATH)
      

      which attempts to load Qt1HostInfo.

      This was reverted in https://codereview.qt-project.org/c/qt/qtqa/+/330111

      The find_package call above must not use PROJECT_VERSION_MAJOR but something else.

      The top-level find_package calls also use PROJECT_VERSION_MAJOR:

      find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Test) # special case
      find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Widgets) # special case
      

      This is bound to break once the QT_REPO_MODULE_VERSION is greater than the Qt version. Regardless of cross-building or not.

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

            semlanik Alexey Edelev
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes