Skip to content

Add a qt5 variant, and implement automatic detection of qt5 pkg-config files

Nirbheek Chauhan requested to merge nirbheek/cerbero:qt5-enablement into master

Usage is:

  1. Download qt binaries, install or extract to a location

  2. Set QT5_PREFIX env var to point to the qt5 dir with arch-specific prefixes inside it. For example, QT5_PREFIX=/path/to/Qt5.12.0/5.12.0.

  3. When not building android-universal, you can also set QMAKE to point to the qmake binary that you want to use. For example, QMAKE=/path/to/Qt5.12.0/5.12.0/gcc_64/bin/qmake. This works for ios-universal because the qt binaries use fat/flat binaries built with lipo that support multiple archs.

  4. Enable the qt5 variant, most easily by running ./cerbero-uninstalled -v qt5 [-c ...] <command>

  5. That's it! The plugin is automatically packaged if it is built, but the qt binaries it needs are not. The user is responsible for those.

Notes:

  • Cerbero will first look at the QMAKE var (unless android-universal) and try to deduce the pkgconfig directory and use that if it's available. Meson will try to use pkg-config first and if that fails, it will try to use qmake.

  • Arch support on Qt 5.12.0 is as follows:

    • Linux: x86_64 (or distro)
    • macOS: x86_64
    • iOS (from macOS): arm64 and x86_64 (targets iOS 10 or newer)
    • Android (from Linux): armv7, arm64, x86
    • Windows: MinGW (x86_64), MSVC 2017 (x86, x86_64), MSVC 2015 (x86), MSVC 2017 UWP (x86, x86_64), MSVC 2015 UWP (x86, x86_64)
    • Windows also support cross-android and cross-ARM-UWP but Cerbero doesn't support those yet
  • Because of limited cross-arch support, the universal builds had to be changed to support 'partial' support for a plugin, where we build it only on some archs.

  • Also includes some patches for Meson for improving Qt detection on iOS (all upstream)

Edited by Nirbheek Chauhan

Merge request reports