aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2019-05-31 14:49:58 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2019-06-07 07:00:37 +0000
commita28765bf60028e7dc59130432edf16782b77a438 (patch)
treed798c8537a4cf2a626cbb487473635b3adb4539a
parent17fb7499c12764264212b1a28eb5782c741964d5 (diff)
Allow enabling gui for native and nativesdk
Some Qt build tools may depend on QtGui, which need platform plugins for running them. Use minimal platform plugin since no interaction with the tool is expected. Add PACKAGECONFIGs that can be used to enable gui and image format plugins for the native and nativesdk builds. Task-number: AUTOSUITE-1009 Change-Id: I39a9c5612da2c84be44e55665a970ed2a2fd512f Reviewed-by: Nikolay Zamotaev <nzamotaev@luxoft.com> Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
-rw-r--r--classes/qmake5_base.bbclass1
-rw-r--r--recipes-qt/qt5/nativesdk-qtbase_git.bb10
-rw-r--r--recipes-qt/qt5/qtbase-native_git.bb8
3 files changed, 10 insertions, 9 deletions
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index 20ff33d4..fb5f9364 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -110,6 +110,7 @@ generate_qt_config_file_effective_paths() {
cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
[EffectivePaths]
HostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
+HostLibraries = ${STAGING_LIBDIR_NATIVE}
HostData = ${OE_QMAKE_PATH_HOST_DATA}
HostPrefix = ${STAGING_DIR_NATIVE}
EOF
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb
index 939d8c02..0efe7605 100644
--- a/recipes-qt/qt5/nativesdk-qtbase_git.bb
+++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb
@@ -65,6 +65,7 @@ FILES_${PN}-dev += " \
FILES_${PN} += " \
${SDKPATHNATIVE}/environment-setup.d \
+ ${OE_QMAKE_PATH_PLUGINS} \
"
# qttools binaries are placed in a subdir of bin in order to avoid
@@ -73,6 +74,10 @@ FILES_${PN} += " \
# disable package auto-renaming for the tools-package.
DEBIAN_NOAUTONAME_${PN} = "1"
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[gui] = "-gui -qpa minimal,-no-gui,"
+PACKAGECONFIG[imageformats] = "-qt-libpng -qt-libjpeg -gif -ico, -no-libpng -no-libjpg -no-ico -no-gif,"
+
QT_CONFIG_FLAGS += " \
-shared \
-silent \
@@ -101,12 +106,8 @@ do_configure() {
-no-gcc-sysroot \
-system-zlib \
-dbus-runtime \
- -no-libjpeg \
- -no-libpng \
- -no-gif \
-no-accessibility \
-no-cups \
- -no-gui \
-no-sql-mysql \
-no-sql-sqlite \
-no-opengl \
@@ -148,7 +149,6 @@ do_install() {
# remove things unused in nativesdk, we need the headers and libs
rm -rf ${D}${datadir} \
- ${D}/${OE_QMAKE_PATH_PLUGINS} \
${D}${libdir}/cmake \
${D}${libdir}/pkgconfig
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb
index cee1a1c4..07978e9b 100644
--- a/recipes-qt/qt5/qtbase-native_git.bb
+++ b/recipes-qt/qt5/qtbase-native_git.bb
@@ -56,18 +56,18 @@ CLEANBROKEN = "1"
XPLATFORM_toolchain-clang = "linux-oe-clang"
XPLATFORM ?= "linux-oe-g++"
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[gui] = "-gui -qpa minimal,-no-gui,"
+PACKAGECONFIG[imageformats] = "-qt-libpng -qt-libjpeg -gif -ico, -no-libpng -no-libjpg -no-ico -no-gif,"
+
QT_CONFIG_FLAGS = " \
-sysroot ${STAGING_DIR_NATIVE} \
-L${STAGING_LIBDIR_NATIVE} \
-no-gcc-sysroot \
-system-zlib \
-qt-pcre \
- -no-libjpeg \
- -no-libpng \
- -no-gif \
-no-accessibility \
-no-cups \
- -no-gui \
-no-sql-mysql \
-no-sql-sqlite \
-no-sql-psql \