[oe] [meta-qt5][PATCH 2/2] qtbase_git: install qt.conf for the target
Jeroen Hofstee
jhofstee at victronenergy.com
Tue Nov 21 09:51:24 UTC 2017
The build-in qmake settings point to the sysroots on the host machine.
Running qmake on the target hence errors with:
Could not find qmake configuration file linux-oe-g++.
Error processing project file
So add qt.conf to the target image with the correct locations.
Signed-off-by: Jeroen Hofstee <jhofstee at victronenergy.com>
---
classes/qmake5_base.bbclass | 29 +++++++++++++++++++++++++++++
recipes-qt/qt5/qtbase_git.bb | 2 ++
2 files changed, 31 insertions(+)
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index 8e1fe20..7ba30f4 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -50,6 +50,35 @@ export OE_QMAKE_QTCONF_PATH = "${WORKDIR}/qt.conf"
inherit qmake5_paths remove-libtool
+generate_target_qt_config_file() {
+ qtconf="$1"
+ cat > "${qtconf}" <<EOF
+[Paths]
+Prefix = ${OE_QMAKE_PATH_PREFIX}
+Headers = ${OE_QMAKE_PATH_HEADERS}
+Libraries = ${OE_QMAKE_PATH_LIBS}
+ArchData = ${OE_QMAKE_PATH_ARCHDATA}
+Data = ${OE_QMAKE_PATH_DATA}
+Binaries = ${OE_QMAKE_PATH_BINS}
+LibraryExecutables = ${OE_QMAKE_PATH_LIBEXECS}
+Plugins = ${OE_QMAKE_PATH_PLUGINS}
+Imports = ${OE_QMAKE_PATH_IMPORTS}
+Qml2Imports = ${OE_QMAKE_PATH_QML}
+Translations = ${OE_QMAKE_PATH_TRANSLATIONS}
+Documentation = ${OE_QMAKE_PATH_DOCS}
+Settings = ${OE_QMAKE_PATH_SETTINGS}
+Examples = ${OE_QMAKE_PATH_EXAMPLES}
+Tests = ${OE_QMAKE_PATH_TESTS}
+HostBinaries = ${OE_QMAKE_PATH_BINS}
+HostData = ${OE_QMAKE_PATH_ARCHDATA}
+HostLibraries = ${OE_QMAKE_PATH_LIBS}
+HostSpec = ${OE_QMAKE_PLATFORM}
+TargetSpec = ${OE_QMAKE_PLATFORM}
+ExternalHostBinaries = ${OE_QMAKE_PATH_BINS}
+Sysroot =
+EOF
+}
+
do_generate_qt_config_file() {
generate_qt_config_file_paths
generate_qt_config_file_effective_paths
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index 318c9f7..fe66eb6 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -244,6 +244,8 @@ do_install_append() {
echo "isEmpty(QMAKE_LINK_C_SHLIB): QMAKE_LINK_C_SHLIB = $OE_QMAKE_LINK_NO_SYSROOT" >> $conf
echo "isEmpty(QMAKE_LFLAGS): QMAKE_LFLAGS = ${OE_QMAKE_LDFLAGS}" >> $conf
echo "isEmpty(QMAKE_STRIP): QMAKE_STRIP = ${TARGET_PREFIX}strip" >> $conf
+
+ generate_target_qt_config_file ${D}${OE_QMAKE_PATH_BINS}/qt.conf
}
# mkspecs have mac specific scripts that depend on perl and bash
--
2.7.4
More information about the Openembedded-devel
mailing list