summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2019-02-21 14:46:22 +0100
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2019-02-27 15:04:59 +0000
commit31e1dda94b66581580dd92a3664d5f5773b81065 (patch)
tree6c55c9c39124ddc22c61156cf736874805e510f5 /src
parente03596c2a7d7a3d4b62c90170175fc61957776a9 (diff)
cmake: Give the egl_x11 test the necessary libs to compile
And add the eglfs_x11 plugin We need to actually try to compile the test as the comment it it says that having x11 and egl is not enough since sometimes they are actually incompatible Change-Id: If6bdc08c21b91fa9c41663f2fa653fd59e5ddd2e Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/configure.cmake8
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt31
3 files changed, 38 insertions, 3 deletions
diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
index 5e29a60463..271c8a182e 100644
--- a/src/gui/configure.cmake
+++ b/src/gui/configure.cmake
@@ -137,8 +137,13 @@ drmModeAtomicReq *request;
)
# egl-x11
+if (HAVE_EGL AND X11_XCB_FOUND AND X11_FOUND)
+ set(egl_x11_TEST_LIBRARIES EGL::EGL X11::X11 X11::XCB)
+endif()
qt_config_compile_test(egl_x11
LABEL "EGL on X11"
+ LIBRARIES "${egl_x11_TEST_LIBRARIES}"
+ CODE
"// Check if EGL is compatible with X. Some EGL implementations, typically on
// embedded devices, are not intended to be used together with X. EGL support
// has to be disabled in plugins like xcb in this case since the native display,
@@ -162,8 +167,7 @@ XCloseDisplay(dpy);
/* END TEST: */
return 0;
}
-"# FIXME: use: egl xcb_xlib
-)
+")
# egl-brcm
qt_config_compile_test(egl_brcm
diff --git a/src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt
index f3aa856379..396964a5e7 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt
+++ b/src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt
@@ -1,7 +1,7 @@
# Generated from deviceintegration.pro.
if(QT_FEATURE_egl_x11)
-# TODO # TODO add_subdirectory(eglfs_x11)
+ add_subdirectory(eglfs_x11)
endif()
if(QT_FEATURE_eglfs_gbm OR QT_FEATURE_eglfs_egldevice)
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt
new file mode 100644
index 0000000000..aaa4da9cb3
--- /dev/null
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from eglfs_x11.pro.
+
+find_package(XCB)
+find_package(X11)
+find_package(X11_XCB)
+
+#####################################################################
+## qeglfs-x11-integration Plugin:
+#####################################################################
+
+add_qt_plugin(qeglfs-x11-integration
+ TYPE egldeviceintegrations
+ SOURCES
+ qeglfsx11integration.cpp qeglfsx11integration.h
+ qeglfsx11main.cpp
+ DEFINES
+ QT_EGL_NO_X11
+ INCLUDE_DIRECTORIES
+ ../../api
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::EglFSDeviceIntegrationPrivate
+ XCB::XCB
+ X11::X11
+ X11::XCB
+ # CONFIG = "egl"
+ # OTHER_FILES = "$$PWD/eglfs_x11.json"
+ # PLUGIN_CLASS_NAME = "QEglFSX11IntegrationPlugin"
+ # _LOADED = "qt_plugin"
+)