[oe-commits] Otavio Salvador : qmake_base.bbclass: add generate_qt_config_file task

git version control git at git.openembedded.org
Wed Feb 23 21:09:39 UTC 2011


Module: openembedded.git
Branch: master
Commit: 459110a17e59594c4fd9183a5684413ffa1479dd
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=459110a17e59594c4fd9183a5684413ffa1479dd

Author: Otavio Salvador <otavio at ossystems.com.br>
Date:   Wed Feb 23 21:07:12 2011 +0000

qmake_base.bbclass: add generate_qt_config_file task

This writes a qt.conf inside WORKDIR to properly configure projects
based on CMake. This is required since qmake variables (returned by
-query command) are fixed into the binary and can only be changed
using a qt.conf file.

Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Tom Rini <tom_rini at mentor.com>

---

 classes/qmake_base.bbclass |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/classes/qmake_base.bbclass b/classes/qmake_base.bbclass
index cf905a7..cc3297c 100644
--- a/classes/qmake_base.bbclass
+++ b/classes/qmake_base.bbclass
@@ -34,6 +34,20 @@ oe_qmake_mkspecs () {
     done
 }
 
+do_generate_qt_config_file() {
+	export QT_CONF_PATH=${WORKDIR}/qt.conf
+	cat > ${WORKDIR}/qt.conf <<EOF
+[Paths]
+Prefix = ${STAGING_DIR}
+Binaries = ${BUILD_SYS}${bindir_native}
+Headers = ${BASEPKG_HOST_SYS}${layout_prefix}/include/qt4
+Plugins = ${BASEPKG_HOST_SYS}${layout_prefix}/lib/qt4/plugins/
+Mkspecs = ${BASEPKG_HOST_SYS}${layout_prefix}/share/qt4/mkspecs/
+EOF
+}
+
+addtask generate_qt_config_file after do_patch before do_configure
+
 qmake_base_do_configure() {
 	case ${QMAKESPEC} in
 	*linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++|*linux-uclibceabi-oe-g++|*linux-gnuspe-oe-g++|*linux-uclibcspe-oe-g++)





More information about the Openembedded-commits mailing list