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) | |
download | meta-qt5-3cf0bbb8e1113376d5b5b26ecff362e180a180fd.tar.gz |
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" | |||
48 | 48 | ||
49 | inherit qmake5_paths remove-libtool | 49 | inherit qmake5_paths remove-libtool |
50 | 50 | ||
51 | generate_target_qt_config_file() { | ||
52 | qtconf="$1" | ||
53 | cat > "${qtconf}" <<EOF | ||
54 | [Paths] | ||
55 | Prefix = ${OE_QMAKE_PATH_PREFIX} | ||
56 | Headers = ${OE_QMAKE_PATH_HEADERS} | ||
57 | Libraries = ${OE_QMAKE_PATH_LIBS} | ||
58 | ArchData = ${OE_QMAKE_PATH_ARCHDATA} | ||
59 | Data = ${OE_QMAKE_PATH_DATA} | ||
60 | Binaries = ${OE_QMAKE_PATH_BINS} | ||
61 | LibraryExecutables = ${OE_QMAKE_PATH_LIBEXECS} | ||
62 | Plugins = ${OE_QMAKE_PATH_PLUGINS} | ||
63 | Imports = ${OE_QMAKE_PATH_IMPORTS} | ||
64 | Qml2Imports = ${OE_QMAKE_PATH_QML} | ||
65 | Translations = ${OE_QMAKE_PATH_TRANSLATIONS} | ||
66 | Documentation = ${OE_QMAKE_PATH_DOCS} | ||
67 | Settings = ${OE_QMAKE_PATH_SETTINGS} | ||
68 | Examples = ${OE_QMAKE_PATH_EXAMPLES} | ||
69 | Tests = ${OE_QMAKE_PATH_TESTS} | ||
70 | HostBinaries = ${OE_QMAKE_PATH_BINS} | ||
71 | HostData = ${OE_QMAKE_PATH_ARCHDATA} | ||
72 | HostLibraries = ${OE_QMAKE_PATH_LIBS} | ||
73 | HostSpec = ${OE_QMAKE_PLATFORM} | ||
74 | TargetSpec = ${OE_QMAKE_PLATFORM} | ||
75 | ExternalHostBinaries = ${OE_QMAKE_PATH_BINS} | ||
76 | Sysroot = | ||
77 | EOF | ||
78 | } | ||
79 | |||
51 | do_generate_qt_config_file() { | 80 | do_generate_qt_config_file() { |
52 | generate_qt_config_file_paths | 81 | generate_qt_config_file_paths |
53 | generate_qt_config_file_effective_paths | 82 | 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() { | |||
239 | echo "isEmpty(QMAKE_LINK_C_SHLIB): QMAKE_LINK_C_SHLIB = $OE_QMAKE_LINK_NO_SYSROOT" >> $conf | 239 | echo "isEmpty(QMAKE_LINK_C_SHLIB): QMAKE_LINK_C_SHLIB = $OE_QMAKE_LINK_NO_SYSROOT" >> $conf |
240 | echo "isEmpty(QMAKE_LFLAGS): QMAKE_LFLAGS = ${OE_QMAKE_LDFLAGS}" >> $conf | 240 | echo "isEmpty(QMAKE_LFLAGS): QMAKE_LFLAGS = ${OE_QMAKE_LDFLAGS}" >> $conf |
241 | echo "isEmpty(QMAKE_STRIP): QMAKE_STRIP = ${TARGET_PREFIX}strip" >> $conf | 241 | echo "isEmpty(QMAKE_STRIP): QMAKE_STRIP = ${TARGET_PREFIX}strip" >> $conf |
242 | |||
243 | generate_target_qt_config_file ${D}${OE_QMAKE_PATH_BINS}/qt.conf | ||
242 | } | 244 | } |
243 | 245 | ||
244 | # mkspecs have mac specific scripts that depend on perl and bash | 246 | # mkspecs have mac specific scripts that depend on perl and bash |