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.

(From OE-Core rev: b137f47a68272da1205fd4a26e9c57fbcfd494b7)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Otavio Salvador 2011-05-08 18:13:14 +00:00 committed by Richard Purdie
parent 9c272d93c6
commit 754b178d8a
1 changed files with 14 additions and 0 deletions

View 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++)