From b421956621a4e4389ba6c68cbf3fb7aa692fa566 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 18 Aug 2016 14:13:34 +0300 Subject: Correctly use QtQuickCompiler when available Make sure the we use QtQuickCompiler only when we either have access to the sources (internal gerrit repo) or the prebuilt binaries are available. The internal-build class checks if we are working within The Qt Company network, so we will also have access to the sources. Setting ENABLE_QTQUICKCOMPILER env to "1" in local.conf has the same effect. Otherwise check if the prebuilt binaries are available as installed by the Qt Online SDK. Change-Id: I63b09ebabc96bb14b119ea7472a3fa7b10e5c2a8 Task-number: QTBUG-53052 Task-number: QTBUG-53216 Reviewed-by: Teemu Holappa --- classes/qtquickcompiler.bbclass | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'classes/qtquickcompiler.bbclass') diff --git a/classes/qtquickcompiler.bbclass b/classes/qtquickcompiler.bbclass index b6710be..90fcfb4 100644 --- a/classes/qtquickcompiler.bbclass +++ b/classes/qtquickcompiler.bbclass @@ -20,18 +20,18 @@ ############################################################################## python __anonymous() { - provider = "qtquickcompiler" + provider = "" + sdk_path = d.getVar('B2QTBASE', True) + "/recipes-qt/qt5-addons/qtquickcompiler-sdk" + pn = d.getVar("PN", True) - sdk_path = d.getVar('QT_SDK_PATH', True) or "" - if len(sdk_path) != 0: - qtquickcompiler_path = d.getVar('B2QTBASE', True) + "/recipes-qt/qt5-addons/qtquickcompiler-sdk" - if not os.path.isdir(qtquickcompiler_path): - bb.note("QtQuickCompiler not available") - return - else: - provider = "qtquickcompiler-sdk" + if d.getVar('ENABLE_QTQUICKCOMPILER', True) == "1": + provider = "qtquickcompiler" + elif os.path.isdir(sdk_path): + provider = "qtquickcompiler-sdk" + else: + bb.note("qtquickcompiler not enabled for %s" % pn) + return - pn = d.getVar("PN", True) if "toolchain-host" in pn: d.appendVar('RDEPENDS_' + pn, " nativesdk-%s-tools" % provider) if "toolchain-target" in pn: -- cgit v1.2.3-54-g00ecf