qtbase: set default platform plugin

Set the default platform plugin to be used, defaults based on
whether x11 and opengl are used.
This commit is contained in:
Samuli Piippo 2020-08-24 13:04:29 +03:00
parent 8a9c74e14c
commit 67d1c04d53
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,24 @@
From 1c1a22552ab587408d8c5775847e72891f698c90 Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Mon, 24 Aug 2020 11:10:17 +0300
Subject: [PATCH] CMake: use definitions when testing EGL
Use any definition from pkgconfig for the EGL compilation test.
Change-Id: I95c659b87ab7b0de81f000e3f52195161a493ef5
---
cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
index 55ca2a99bd..16dc1768ea 100644
--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
@@ -118,6 +118,7 @@ endif()
cmake_push_check_state(RESET)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${EGL_LIBRARY}")
list(APPEND CMAKE_REQUIRED_INCLUDES "${EGL_INCLUDE_DIR}")
+list(APPEND CMAKE_REQUIRED_DEFINITIONS "${EGL_DEFINITIONS}")
check_cxx_source_compiles("
#include <EGL/egl.h>

View File

@ -17,6 +17,7 @@ SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
file://0005-Allow-build-without-opengl.patch \
file://0001-CMake-use-definitions-when-testing-EGL.patch \
"
DEPENDS += "\
@ -57,6 +58,10 @@ BUILD_TYPE ?= "Release"
# OpenSSL linking mode: runtime, linked
OPENSSL_LINKING_MODE ?= "runtime"
# Default platform plugin
QT_QPA_DEFAULT_PLATFORM ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xcb', \
bb.utils.contains('DISTRO_FEATURES', 'opengl', 'eglfs', 'linuxfb', d), d)}"
PACKAGECONFIG[cups] = "-DFEATURE_cups=ON,-DFEATURE_cups=OFF,cups"
PACKAGECONFIG[dbus] = "-DFEATURE_dbus=ON,-DFEATURE_dbus=OFF,dbus"
PACKAGECONFIG[udev] = "-DFEATURE_libudev=ON,-DFEATURE_libudev=OFF,udev"
@ -108,6 +113,7 @@ EXTRA_OECMAKE += "\
EXTRA_OECMAKE_append_class-target = "\
-DFEATURE_rpath=OFF \
-DQT_QPA_DEFAULT_PLATFORM=${QT_QPA_DEFAULT_PLATFORM} \
"
SYSROOT_DIRS += "${prefix}/mkspecs"