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

Port mkspec QT_QPA_DEFAULT_PLATFORM mechanism to CMake

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.0 (Next Major Release)
    • Fix Version/s: None
    • Component/s: Build System: CMake
    • Labels:

      Description

      In src/gui/configure.pri there's:

      defineTest(qtConfTest_qpaDefaultPlatform) {
          name =
          !isEmpty(config.input.qpa_default_platform): name = $$config.input.qpa_default_platform
          else: !isEmpty(QT_QPA_DEFAULT_PLATFORM): name = $$QT_QPA_DEFAULT_PLATFORM
      .......
      }
      

      Note the check for the QT_QPA_DEFAULT_PLATFORM qmake variable.
      This is set in various mkspecs/devices files.

      We currently lack this behaviour in the CMake port, which means most cross-compiling Linux targets get 'xcb' as the default qpa plugin, despite xcb most likely not being available.

      We should find a way to specify and port this mechanism to CMake.

      A workaround when launching applications is to set the QT_QPA_PLATFORM env var.

        Attachments

        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:
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes