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

Port mkspec QT_QPA_DEFAULT_PLATFORM mechanism to CMake

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.0
    • Build System: CMake

    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

        For Gerrit Dashboard: QTBUG-87805
        # Subject Branch Project Status CR V

        Activity

          People

            semlanik Alexey Edelev
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews