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

Problematic calling of qt_find_package(Qt6) in qt_internal_project_setup

XMLWordPrintable

    • b37c0d7c6 (dev), d2e85cede (dev), 5da0b7624 (6.8), 9135044b8 (dev), d0207275f (6.8)

      Once https://codereview.qt-project.org/c/qt/qtbase/+/535840 landed, we started calling qt_find_package(Qt6 PROVIDED_TARGETS PlatformCommonInternal ...)
      in qt_internal_project_setup for every repo configuration.

      This was done to avoid some issues with Threads::Threads And Platform not being global when building the Quick3D OpenXR 3rd party:

      https://codereview.qt-project.org/c/qt/qtquick3d/+/535738/1/src/xr/quick3dxr/CMakeLists.txt#57

      The fix that fixed the issue uses qt_find_package to recursively promote the Platform targets to global

      The problem is that qt_find_package is really only meant to be called for 3rd party libraries, not Qt itself, otherwise some code paths might consider the Platform targets and the Qt6 package as a 3rd party dependency. This is also troublesome for the upcoming SBOM file creation which needs to accurately track what are the 3rd party dependencies.

      We should check if we can avoid the usage of qt_find_package for the original issue and replace it with custom global promotion code, or perhaps use some flag to differentiate the Qt6 package specifically.

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

            qtbuildsystem Qt Build System Team
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: