Skip to content
Snippets Groups Projects

qt: Rework how we find the Qt QPA header

Merged Jan Schmidt requested to merge thaytan/gst-plugins-good:qt5-qpa-optional into master

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

Edited by GStreamer Release Monkey

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 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.

  • Nirbheek Chauhan added 2 commits

    added 2 commits

    • 1fc6d0e7 - qt: Rework how we find the Qt QPA header
    • 8337f40b - qt: Only check for moc-qt5/moc in PATH if not cross-compiling

    Compare with previous version

  • Nirbheek Chauhan resolved all threads

    resolved all threads

  • 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 Chauhan
  • Nirbheek Chauhan changed title from qt5: Don't fail if qmake isn't available to qt: Rework how we find the Qt QPA header

    changed title from qt5: Don't fail if qmake isn't available to qt: Rework how we find the Qt QPA header

  • Nirbheek Chauhan changed the description

    changed the description

  • Nirbheek Chauhan added 18 commits

    added 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

    Compare with previous version

  • 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 Chauhan
  • Nirbheek Chauhan added 2 commits

    added 2 commits

    • f0f90180 - qt: Only check for moc-qt5/moc in PATH if not cross-compiling
    • fdfbcb4c - qt: Rework how we find the Qt QPA header

    Compare with previous version

  • Nirbheek Chauhan added 12 commits

    added 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

    Compare with previous version

  • added 2 commits

    • ed457fe0 - qt: Only check for moc-qt5/moc in PATH if not cross-compiling
    • 09971233 - qt: Rework how we find the Qt QPA header

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading