]> code.ossystems Code Review - openembedded-core.git/commitdiff
qmake_base.bbclass: add generate_qt_config_file task
authorOtavio Salvador <otavio@ossystems.com.br>
Sun, 8 May 2011 18:13:14 +0000 (18:13 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 May 2011 15:09:56 +0000 (16:09 +0100)
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@ossystems.com.br>
meta/classes/qmake_base.bbclass

index 24a0f11f467f96bf38a8448393f057c2f1f74193..a054efd249b3c96696f3005a7a6525b3750aef2a 100644 (file)
@@ -31,6 +31,20 @@ oe_qmake_mkspecs () {
     done
 }
 
+do_generate_qt_config_file() {
+       export QT_CONF_PATH=${WORKDIR}/qt.conf
+       cat > ${WORKDIR}/qt.conf <<EOF
+[Paths]
+Prefix =
+Binaries = ${STAGING_BINDIR_NATIVE}
+Headers = ${STAGING_INCDIR}/qt4
+Plugins = ${STAGING_LIBDIR}/qt4/plugins/
+Mkspecs = ${STAGING_DATADIR}/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++)