aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2016-08-18 14:13:34 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2016-08-19 12:27:53 +0000
commitb421956621a4e4389ba6c68cbf3fb7aa692fa566 (patch)
treef8dea80d362fd074065c904364beb52023c7d0ee
parenta9c0c957a458a17be52cef418a5fec22760a69cf (diff)
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 <teemu.holappa@theqtcompany.com>
-rw-r--r--classes/internal-build.bbclass1
-rw-r--r--classes/qtquickcompiler.bbclass20
-rw-r--r--conf/local.conf.sample3
3 files changed, 14 insertions, 10 deletions
diff --git a/classes/internal-build.bbclass b/classes/internal-build.bbclass
index 2a975f6a..72498cb3 100644
--- a/classes/internal-build.bbclass
+++ b/classes/internal-build.bbclass
@@ -26,6 +26,7 @@ python enable_internal_build () {
except:
return
+ e.data.setVar('ENABLE_QTQUICKCOMPILER', "1")
e.data.setVar('SSTATE_MIRRORS', "file://.* http://yocto-cache.ci.local/sstate-caches/${DISTRO_CODENAME}/PATH")
e.data.setVar('PREMIRRORS', "\
ftp://.*/.* http://yocto-cache.ci.local/sources/ \n \
diff --git a/classes/qtquickcompiler.bbclass b/classes/qtquickcompiler.bbclass
index b6710beb..90fcfb46 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:
diff --git a/conf/local.conf.sample b/conf/local.conf.sample
index 5dd5c3dd..ad55f784 100644
--- a/conf/local.conf.sample
+++ b/conf/local.conf.sample
@@ -273,6 +273,9 @@ INHERIT += "rm_work"
INHERIT += "image-buildinfo"
INHERIT += "internal-build"
+# Enables use of QtQuickCompiler if you have access to the gerrit project
+#ENABLE_QTQUICKCOMPILER = "1"
+
ACCEPT_FSL_EULA = "1"
LICENSE_FLAGS_WHITELIST = "commercial"