diff --git a/recipes-qt/qt6/qtbase/0001-CMake-use-definitions-when-testing-EGL.patch b/recipes-qt/qt6/qtbase/0001-CMake-use-definitions-when-testing-EGL.patch new file mode 100644 index 0000000..6b8f537 --- /dev/null +++ b/recipes-qt/qt6/qtbase/0001-CMake-use-definitions-when-testing-EGL.patch @@ -0,0 +1,24 @@ +From 1c1a22552ab587408d8c5775847e72891f698c90 Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +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 diff --git a/recipes-qt/qt6/qtbase_git.bb b/recipes-qt/qt6/qtbase_git.bb index 6e173f6..94cc40c 100644 --- a/recipes-qt/qt6/qtbase_git.bb +++ b/recipes-qt/qt6/qtbase_git.bb @@ -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"