aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase-native.inc
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-04-03 21:52:54 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2013-04-17 16:10:02 +0200
commitb78a292a584f084cc15715c3a68693b008ef6682 (patch)
tree8c6c649c586d57b615b08e3e59241002e0d6c52d /recipes-qt/qt5/qtbase-native.inc
parentde250e3d0e437df09a8f23ad7fdb5fc39f17f7e8 (diff)
qtbase: replace g++.conf and linux.conf with qmake.conf
* g++.conf and linux.conf were outdated a lot, lacking new options like QMAKE_COMPILER causing a lot of warning like: Project WARNING: qmake spec does not announce the compiler family. Guessed gcc. * Instead of replacing whole common files, use custom qmake.conf which overwrites common setting after including it
Diffstat (limited to 'recipes-qt/qt5/qtbase-native.inc')
-rw-r--r--recipes-qt/qt5/qtbase-native.inc20
1 files changed, 15 insertions, 5 deletions
diff --git a/recipes-qt/qt5/qtbase-native.inc b/recipes-qt/qt5/qtbase-native.inc
index d9cc4870..0f196e4e 100644
--- a/recipes-qt/qt5/qtbase-native.inc
+++ b/recipes-qt/qt5/qtbase-native.inc
@@ -15,6 +15,7 @@ QT_DIR_NAME ?= "qt5"
SRC_URI += " \
file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
file://0001-Always-build-uic.patch \
+ file://qmake.conf \
"
EXTRA_ENV = 'MAKE="make -e ${PARALLEL_MAKE}"'
@@ -56,6 +57,20 @@ EXTRA_OECONF = " \
-no-rpath \
"
+# qtbase is exception, we need to use mkspecs from ${S}
+QMAKE_MKSPEC_PATH_NATIVE = "${S}/mkspecs"
+
+do_configure_prepend() {
+ if [ ! -e ${OE_QMAKESPEC} ]; then
+ mkdir -p ${OE_QMAKESPEC}
+ fi
+ # use default qplatformdefs.h from linux-g++
+ cp -va ${QMAKE_MKSPEC_PATH_NATIVE}/linux-g++/qplatformdefs.h ${OE_QMAKESPEC}/
+ # use modified qmake.conf which is using OE_QMAKE_* shell variables
+ # exported from qmake5_base.bbclass to define toolchain and flags
+ cp -va ${WORKDIR}/qmake.conf ${OE_QMAKESPEC}/
+}
+
do_configure() {
# Avoid setting QMAKE_LINK from LD (since we want the linker to be g++)
unset LD
@@ -65,9 +80,4 @@ do_configure() {
do_install() {
oe_runmake install INSTALL_ROOT=${D}
- ln -sf linux-g++ ${D}${datadir}/${QT_DIR_NAME}/mkspecs/${BUILD_OS}-oe-g++
-
- # replace common files with our version
- cp -f ${WORKDIR}/g++.conf ${D}${datadir}/${QT_DIR_NAME}/mkspecs/common/g++-unix.conf
- cp -f ${WORKDIR}/linux.conf ${D}${datadir}/${QT_DIR_NAME}/mkspecs/common/linux.conf
}