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

CMake configuration files unable to find QtMultimedia for QNX

    XMLWordPrintable

Details

    • QNX
    • d23fcd68bc3c514fbda822605c3aa6cbda1c043c (qt/tqtc-qtmultimedia/5.15)

    Description

      Development Environment: Ubuntu 18.04, Qt Creator 4.14.0, Qt Framework 5.15.2

      Target Platform: QNX 7.0 armv8 (aarch64)

      I am trying to develop an application for a QNX target with CMake 3.20 as my build system. Configuring the project for a Linux target works, but configuring the project for QNX fails as CMake parses the project, and produces the following error:

       

      /home/vagrant/Qt/5.15.2/qnx7_armv8/lib/cmake/Qt5Multimedia/Qt5Multimedia_.cmake:4: error: _populate_Multimedia_plugin_properties Macro invoked with incorrect arguments for macro named: _populate_Multimedia_plugin_properties /home/vagrant/Qt/5.15.2/qnx7_armv8/lib/cmake/Qt5Multimedia/Qt5MultimediaConfig.cmake:228 (include) /home/vagrant/Qt/5.15.2/qnx7_armv8/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package) CMakeLists.txt:28 (find_package)
      

       

      I did some digging in the CMake code and believe the following is required to fix this issue:

      1) Add "PLUGIN_CLASS_NAME = QnxAudioPlugin" to Src/qtmultimedia/src/plugins/qnx-audio/audio.pro

      2) Replace qnx7_armv8/lib/cmake/Qt5Multimedia/Qt5Multimedia_.cmake with a new file called Qt5Multimedia_QnxAudioPlugin.cmake. The file contents should be as follows:

       

      add_library(Qt5::QnxAudioPlugin MODULE IMPORTED)
      
      _populate_Multimedia_plugin_properties(QnxAudioPlugin RELEASE "audio/libqtmedia_qnx_audio.so" FALSE)
      
      list(APPEND Qt5Multimedia_PLUGINS Qt5::QnxAudioPlugin)
      set_property(TARGET Qt5::Multimedia APPEND PROPERTY QT_ALL_PLUGINS_audio Qt5::QnxAudioPlugin)
      set_property(TARGET Qt5::QnxAudioPlugin PROPERTY QT_PLUGIN_TYPE "audio")
      set_property(TARGET Qt5::QnxAudioPlugin PROPERTY QT_PLUGIN_EXTENDS "")
      set_property(TARGET Qt5::QnxAudioPlugin PROPERTY QT_PLUGIN_CLASS_NAME "QnxAudioPlugin")
      
      

       

      I have attached a copy of a sample project which reproduces the described behavior.

       

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            aaron.husz Aaron Husz
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes