From: Denys Dmytriyenko <[email protected]> Recipes that need to compile against either Qt4 or Qt5 should inherit this class instead of "inherit qt4e" or "inherit qt5" directly. Setting global QT_PROVIDER to either "qt4e" or "qt5" will configure those recipes automatically.
Signed-off-by: Denys Dmytriyenko <[email protected]> Acked-by: Franklin S. Cooper Jr <[email protected]> Acked-by: Chase Maupin <[email protected]> --- meta-arago-distro/classes/qt-provider.bbclass | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 meta-arago-distro/classes/qt-provider.bbclass diff --git a/meta-arago-distro/classes/qt-provider.bbclass b/meta-arago-distro/classes/qt-provider.bbclass new file mode 100644 index 0000000..444c76a --- /dev/null +++ b/meta-arago-distro/classes/qt-provider.bbclass @@ -0,0 +1,19 @@ +# Class to handle switching between Qt4 and Qt5 +# Usage: +# 1. Set QT_PROVIDER in distro config to either "qt4e" or "qt5" +# It defaults to "qt4e" when not set +# Hasn't been tested with "qt4x11" but should theoretically work +# 2. Update recipes to inherit qt-provider instead of qt4e directly +# 3. May need to use below QT_DEPENDS_* and QT_RDEPENDS_* variables +# instead of the actual Qt-version specific values + +QT_PROVIDER ?= "qt4e" + +inherit ${QT_PROVIDER} + +# Build-time dependencies +QT_DEPENDS_BASE = "${@base_conditional('QT_PROVIDER', 'qt5', 'qtbase', 'qt4-embedded', d)}" +QT_DEPENDS_WEBKIT = "${@base_conditional('QT_PROVIDER', 'qt5', 'qtwebkit', '', d)}" + +# Run-time dependencies +QT_RDEPENDS_FONTS = "${@base_conditional('QT_PROVIDER', 'qt5', 'qtbase-fonts', 'qt4-embedded-fonts', d)}" -- 1.8.3.2 _______________________________________________ meta-arago mailing list [email protected] http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
