[oe] [meta-qt5][PATCH] qt3d: support qgltf in native and nativesdk builds

Samuli Piippo samuli.piippo at theqtcompany.com
Fri Feb 12 16:04:16 UTC 2016


qgltf is used to import a variety of 3D model formats and export into
fast-to-load, optimized glTF assets embedded into Qt resource files
---
 .../qt5/qt3d/0001-Allow-a-tools-only-build.patch   | 31 ++++++++++++++++++++++
 recipes-qt/qt5/qt3d_git.bb                         | 16 ++++++++++-
 2 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch

diff --git a/recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch b/recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch
new file mode 100644
index 0000000..c9d2223
--- /dev/null
+++ b/recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch
@@ -0,0 +1,31 @@
+From 778d0c4515bae5bdeb650fb3e6b3e32a73722b51 Mon Sep 17 00:00:00 2001
+From: Samuli Piippo <samuli.piippo at theqtcompany.com>
+Date: Wed, 10 Feb 2016 09:02:09 +0200
+Subject: [PATCH] Allow a tools-only build
+
+---
+ qt3d.pro | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/qt3d.pro b/qt3d.pro
+index a26e76d..263e3c4 100644
+--- a/qt3d.pro
++++ b/qt3d.pro
+@@ -1,4 +1,4 @@
+-requires(contains(QT_CONFIG, opengl))
++!tools-only:requires(contains(QT_CONFIG, opengl))
+ 
+ load(configure)
+ qtCompileTest(assimp)
+@@ -17,3 +17,8 @@ load(qt_parts)
+ 
+ OTHER_FILES += \
+     sync.profile
++
++tools-only {
++    sub_tools.depends -= sub_src
++    SUBDIRS = sub_tools
++}
+-- 
+1.9.1
+
diff --git a/recipes-qt/qt5/qt3d_git.bb b/recipes-qt/qt5/qt3d_git.bb
index 0ec99c6..a19422b 100644
--- a/recipes-qt/qt5/qt3d_git.bb
+++ b/recipes-qt/qt5/qt3d_git.bb
@@ -8,7 +8,19 @@ LIC_FILES_CHKSUM = " \
     file://LICENSE.GPL;md5=05832301944453ec79e40ba3c3cfceec \
 "
 
-DEPENDS = "qtdeclarative"
+DEPENDS += "qtbase"
+DEPENDS_class-target += "qtdeclarative qt3d-native"
+
+SRC_URI += " \
+    file://0001-Allow-a-tools-only-build.patch \
+    "
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG_class-native ??= "tools-only"
+PACKAGECONFIG_class-nativesdk ??= "tools-only"
+PACKAGECONFIG[tools-only] = "CONFIG+=tools-only"
+
+EXTRA_QMAKEVARS_PRE += "${EXTRA_OECONF}"
 
 FILES_${PN}-qmlplugins += " \
     ${OE_QMAKE_PATH_QML}/*/*/*.bez \
@@ -16,3 +28,5 @@ FILES_${PN}-qmlplugins += " \
 "
 
 SRCREV = "9b9f34701f47824e8201453d148152fb0855f98a"
+
+BBCLASSEXTEND += "native nativesdk"
-- 
1.9.1




More information about the Openembedded-devel mailing list