Bug#1087385: [Pkg-cmake-team] Bug#1087385: cmake 3.31.0-1 breaks Qt6Qml builds
On Fri, Nov 15, 2024 at 3:11 AM Sune Stolborg Vuorela wrote:
> I think it is going to affect all of Qt6-packages, not just Qt6Declarative. At
> least from a quick glance over other of my Qt6*Targets.cmake with private dev
> things have the same thing.
This is not a new diagnostic. Most of the other packages will
have already triggered it if they had the problem. What makes
Qt6Qml special is the extra `target_include_directories` call
in `_qt_internal_qml_type_registration` I quoted previously.
That covered the diagnostic due to the now-fixed bug in CMake.
Either way, this is a problem that eventually needs to be worked
out in the Qt6 packaging regardless.
> Qt6QmlTargets.cmake creates two targets. One that you are likely to use and
> one you are very very very unlikely to need. Also using that very unlikely to
> need target also gives more work for the rest of Debian down the line.
Perhaps `Qt6QmlTargets` should be split by upstream to move the unlikely
target into a dedicated `Qt6QmlPrivateTargets` file. Meanwhile, here is
a workaround one could apply in Debian packaging:
One could patch `Qt6QmlConfig.cmake` to, after loading `Qt6QmlTargets.cmake`,
modify the `Qt6::QmlPrivate` target's `INTERFACE_INCLUDE_DIRECTORIES`
property to remove the entries corresponding to `qt6-declarative-private-dev`
if those directories do not exist. That will hide the dependency from the
CMake diagnostic. If an application really needs the headers, the error will
occur during its compilation instead.
-Brad
Reply to: