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>
This commit is contained in:
Jeroen Hofstee
2017-11-21 10:51:24 +01:00
committed by Martin Jansa
parent aeeaa939c7
commit 3cf0bbb8e1
2 changed files with 31 additions and 0 deletions

View File

@@ -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

View File

@@ -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