#1104192 qt6-declarative-dev: Lots of warnings in qml project using cmake

Package:
qt6-declarative-dev
Source:
qt6-declarative-dev
Description:
Qt 6 declarative development files
Submitter:
Cryolitia
Date:
2025-04-27 06:09:03 UTC
Severity:
normal
#1104192#5
Date:
2025-04-27 05:58:19 UTC
From:
To:
In Debian sid, with Qt 6.8.2. I'm building a Qt application using QML
and cmake. The cmake prints lots of warnings such as below:

```
CMake Warning at
/usr/lib/x86_64-linux-gnu/cmake/Qt6Qml/Qt6QmlMacros.cmake:3949 (message):
   The qml plugin 'qtquickdialogsplugin' is a dependency of
'SpectraViewApp', but the link target it defines
(Qt6::qtquickdialogsplugin) does not exist in the current scope. The
plugin will not be linked.
Call Stack (most recent call first):
   /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreMacros.cmake:753
(qt6_import_qml_plugins)
   /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreMacros.cmake:753
(cmake_language)
   /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreMacros.cmake:851
(_qt_internal_finalize_executable)

/usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreMacros.cmake:820:EVAL:1
(qt6_finalize_target)

CMake Warning at
/usr/lib/x86_64-linux-gnu/cmake/Qt6Qml/Qt6QmlMacros.cmake:3949 (message):
   The qml plugin 'qtquickdialogs2quickimplplugin' is a dependency of
'SpectraViewApp', but the link target it defines
(Qt6::qtquickdialogs2quickimplplugin) does not exist in the current
scope. The plugin will not be linked.
Call Stack (most recent call first):
   /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreMacros.cmake:753
(qt6_import_qml_plugins)
   /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreMacros.cmake:753
(cmake_language)
   /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreMacros.cmake:851
(_qt_internal_finalize_executable)

/usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreMacros.cmake:820:EVAL:1
(qt6_finalize_target)
```

If I ignore these warnings and going on. The application could run
perfectly.

As far as I known, the issue affects Debian, Ubuntu and Deepin. I also
tried to build the same project on AOSC OS and Alpine Edge, which have
the same Qt version 6.8.2. But these warnings won't appear on them.

A quick search could found that the issue has been reported on GitHub on
several different Qt applications' repo.

1. https://github.com/zhuzichu520/FluentUI/issues/480
2. https://github.com/hyprwm/hyprland-qtutils/issues/1