qt: Rework how we find the Qt QPA header
Instead of querying the Qt include path from the dependency or from qmake, rely on the qt5qml_dep to set the include path to QtGui correctly, and look for the header inside the private includedir.
Then we can use that path to include the header directly.
Reported in gst-plugins-base#780 (comment 548092)
Also, only check for moc-qt5/moc in PATH if not cross-compiling
Merge request reports
Activity
- Resolved by Nirbheek Chauhan
changed milestone to %1.17.2
added Build label
- Resolved by Nirbheek Chauhan
There a bit of a situation. For cross-compilation notably, this check is insufficient, as the qmake-qt5 version must match the target os version. Also, this is a fallback, since pkg-config is tried first by meson. But pkg-config way does not work for all cross-compilation cases. This check is basically a partial workaround to qt5 and meson issues.
@nirbheek but I still think we need to find a meson fix for this, and not have to copy paste this complicated code in 3 places in GStreamer. Remember, meson already got complex logic to try and find the tools it is just that the checks there don't allow for optional requirements as it's doing checks too late.
@nirbheek but I still think we need to find a meson fix for this, and not have to copy paste this complicated code in 3 places in GStreamer. Remember, meson already got complex logic to try and find the tools it is just that the checks there don't allow for optional requirements as it's doing checks too late.
Yes, we need to have a way for meson to do the checks that we're doing by hand here, which will require some thinking and discussion with upstream. I'm sure it can be done, and we should do it for 1.19.x.
I eliminated the problematic check entirely, so we don't need anything in meson now. Verified that this works on native linux.
Edited by Nirbheek Chauhanadded 18 commits
-
8337f40b...8d464c83 - 16 commits from branch
gstreamer:master
- bd8fd1a7 - qt: Rework how we find the Qt QPA header
- 5455a9e6 - qt: Only check for moc-qt5/moc in PATH if not cross-compiling
-
8337f40b...8d464c83 - 16 commits from branch
Tested on Windows (MSVC x64):
|Has header "5.14.2/QtGui/qpa/qplatformnativeinterface.h" with dependency qt5: YES |Message: Found QtGui QPA header in 5.14.2/QtGui
Tested on Android:
|Found qmake: /home/nirbheek/projects/qt/5.15.0/android/bin/qmake (5.15.0) |Run-time dependency qt5 (modules: Core, Gui, Qml, Quick) found: YES 5.15.0 (qmake) |Has header "5.15.0/QtGui/qpa/qplatformnativeinterface.h" with dependency qt5: YES |Message: Found QtGui QPA header in 5.15.0/QtGui
Tested on macOS (looks like it was broken earlier):
|Using 'QMAKE' from environment with value: '/Users/nirbheek/projects/qt/5.12.0/clang_64/bin/qmake' |Found qmake: /Users/nirbheek/projects/qt/5.12.0/clang_64/bin/qmake (5.12.0) |Run-time dependency qt5 (modules: Core, Gui, Qml, Quick) found: YES 5.12.0 (qmake) |Has header "5.12.0/QtGui/qpa/qplatformnativeinterface.h" with dependency qt5: YES |Message: Found QtGui QPA header in 5.12.0/QtGui
Tested on iOS (looks like it was broken earlier):
|Found qmake: /Users/nirbheek/projects/qt/5.12.0/ios/bin/qmake (5.12.0) |Run-time dependency qt5 (modules: Core, Gui, Qml, Quick) found: YES 5.12.0 (qmake) |Has header "5.12.0/QtGui/qpa/qplatformnativeinterface.h" with dependency qt5: YES |Message: Found QtGui QPA header in 5.12.0/QtGui
In all cases, the gstqmlgl plugin was also built with
ninja
.That's everything. Good to go.
Edited by Nirbheek Chauhanadded 12 commits
-
fdfbcb4c...93b202b8 - 10 commits from branch
gstreamer:master
- ef5323f5 - qt: Only check for moc-qt5/moc in PATH if not cross-compiling
- fcca24cb - qt: Rework how we find the Qt QPA header
-
fdfbcb4c...93b202b8 - 10 commits from branch
added 1.16 Maybe backport labels
assigned to @gstreamer-merge-bot
mentioned in commit thaytan/gst-plugins-good@ed457fe0
mentioned in commit thaytan/gst-plugins-good@09971233