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

CMake config not available for Multimedia and SerialPort

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.2.0 Beta1
    • Build System: CMake
    • None

      While trying to port one of my applications from Qt 5.15.2 to Qt 6.2 Beta1, I noticed that the following lines fail in my cmake project:

       

      find_package(Qt6 COMPONENTS Multimedia REQUIRED)
      find_package(Qt6 COMPONENTS SerialPort REQUIRED)
      

       

      The error I got is

       

      -- Could NOT find Qt6Multimedia (missing: Qt6Multimedia_DIR)
      CMake Error at CMakeLists.txt:14 (find_package):
        Found package configuration file:    C:/Qt/6.2.0/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
        FOUND.  Reason given by package:  Failed to find Qt component "Multimedia" config file at ""

       

      -- Could NOT find Qt6SerialPort (missing: Qt6SerialPort_DIR)
      CMake Error at CMakeLists.txt:16 (find_package):
        Found package configuration file:    C:/Qt/6.2.0/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
        FOUND.  Reason given by package:  Failed to find Qt component "SerialPort" config file at ""

       

      Both packages are found correctly when using Qt5.15. I checked and could not find a Qt6Multimedia nor a Qt6SerialPort folder under C:\Qt\6.2.0\msvc2019_64\lib\cmake. It looks like the cmake config files are not installed (which could be a packaging or a build issue).

       

      Qt 6.2 Beta1 was installed via online installer.

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

            qtbuildsystem Qt Build System Team
            rolandwinklmeier Roland Winklmeier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes