diff options
author | Jeroen Hofstee <jhofstee@victronenergy.com> | 2017-11-21 10:51:24 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-12-20 08:23:09 +0000 |
commit | 3cf0bbb8e1113376d5b5b26ecff362e180a180fd (patch) | |
tree | 34d11ac23af97ceec6be4461927db82f59d89bd9 | |
parent | aeeaa939c7f129a4be2220c86fcebca0fcc8b100 (diff) |
qtbase_git: install qt.conf for the target
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@victronenergy.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r-- | classes/qmake5_base.bbclass | 29 | ||||
-rw-r--r-- | recipes-qt/qt5/qtbase_git.bb | 2 |
2 files changed, 31 insertions, 0 deletions
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass index 3bc1279d..8f1d143a 100644 --- a/classes/qmake5_base.bbclass +++ b/classes/qmake5_base.bbclass @@ -48,6 +48,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 e5f0ab76..4e8dc4cd 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb @@ -239,6 +239,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 |