QtSerialBus implementation error
-
Hi,
I want to add SerialBus functionality to my application. (Desktop Qt 6.3.1 MinGW 64-bit) To do so I added to the CMake-file the find_package function.CMakeLists.txt
.. find_package(Qt${QT_VERSION_MAJOR} REQUIRED SerialBus REQUIRED) ..
If I now build the project i get the folling error:
C:\Qt\6.3.1\mingw_64\lib\cmake\Qt6\Qt6Config.cmake:213: Warnung: Found package configuration file: C:/Qt/6.3.1/mingw_64/lib/cmake/Qt6SerialBus/Qt6SerialBusConfig.cmake but it set Qt6SerialBus_FOUND to FALSE so package "Qt6SerialBus" is considered to be NOT FOUND. Reason given by package: Qt6SerialBus could not be found because dependency Qt6SerialPort could not be found. CMakeLists.txt:16 (find_package) C:\Users\*name*\Desktop\MFA\MainfrankenApplication\CMakeLists.txt:16: Fehler: Found package configuration file: C:/Qt/6.3.1/mingw_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 "SerialBus". Expected Config file at "C:/Qt/6.3.1/mingw_64/lib/cmake/Qt6SerialBus/Qt6SerialBusConfig.cmake" exists
What does it mean that 'Qt6SerialBus could not be found because dependency Qt6SerialPort could not be found. CMakeLists.txt:16 (find_package)' like stated in the warning?
I installed the SerliaBus module via the Qt Maintenance Tool and restarted my PC so it should have everything it needs to work. I Don't find any solution for my problem by scraping the forum or google.
Anyone has a idea how to fix this?
Markus
-
@Niuzu said in QtSerialBus implementation error:
What does it mean that 'Qt6SerialBus could not be found because dependency Qt6SerialPort could not be found. CMakeLists.txt:16 (find_package)' like stated in the warning?
It means that CMake couldn't locate or load the logic for Qt6SerialPort, which is what Qt6SerialBus depends on.
- How did you configure your project (command line, Qt Creator)? If you configured from the command line, how did you tell CMake about Qt?
- Can you check that C:\Qt\6.3.1\mingw_64\lib\cmake\Qt6SerialPort\Qt6SerialPortConfig.cmake exists for you?
- If it does, look for further warnings/errors for Qt6SerialPort in your cmake output. You can also launch cmake with --trace to make the output more verbose (but please be aware that this generates a lot of output, and potentially makes Qt Creator a bit unresponsive; better to do it from the command line and then piping the output to a file)