QT_TOOLS_PREFIX = "${SDKPATHNATIVE}${bindir_nativesdk}"
toolchain_create_sdk_env_script_append() {
+ echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' >> $script
+ echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script
+ echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script
echo 'export OE_QMAKE_CC=${TARGET_PREFIX}gcc' >> $script
echo 'export OE_QMAKE_CXX=${TARGET_PREFIX}g++' >> $script
echo 'export OE_QMAKE_LINK=${TARGET_PREFIX}g++' >> $script
echo 'export OE_QMAKE_QDBUSXML2CPP=${QT_TOOLS_PREFIX}/qdbusxml2cpp4' >> $script
echo 'export OE_QMAKE_QT_CONFIG=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
echo 'export QMAKESPEC=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
+
+ # make a symbolic link to mkspecs for compatibility with Nokia's SDK
+ # and QTCreator
+ (cd ${SDK_OUTPUT}/${QT_TOOLS_PREFIX}/..; ln -s ${SDKTARGETSYSROOT}/usr/share/qtopia/mkspecs mkspecs;)
}
EXTRA_OEMAKE = " "
do_configure() {
- if [ ! -e bin/qmake ]; then
- ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
- fi
-
if [ ! -e mkspecs/${TARGET_OS}-oe-g++ ]; then
ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++
fi
cp ../g++.conf mkspecs/common
cp ../linux.conf mkspecs/common
- (echo o; echo yes) | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
+ # first launch configure to get qmake compiled for the nativesdk
+ (echo o; echo yes) | CC="${CC}" CXX="${CXX}" ./configure ${EXTRA_OECONF} || true
+
+ # then backup the binary and start again with a qmake which can run on the build host
+ mv bin/qmake bin/qmake_nativesdk
+ if [ ! -e bin/qmake ]; then
+ ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
+ fi
+
+ (echo o; echo yes) | CC="${CC}" CXX="${CXX}" ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
}
TOBUILD = "\
do_install() {
install -d ${D}${bindir}
- install -m 0755 bin/qmake ${D}${bindir}/qmake2
+ install -m 0755 bin/qmake_nativesdk ${D}${bindir}/qmake2
for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do
install -m 0755 bin/${i} ${D}${bindir}/${i}4
done
for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do \
ln -s ${i}4 ${i}; \
done)
-
- # make a symbolic link to mkspecs for compatibility with Nokia's SDK
- # and QTCreator
- (cd ${D}${bindir}/..; ln -s ${TARGET_SYS}/usr/share/qtopia/mkspecs mkspecs;)
}
-