From 623e866d5c5b9e49f827208604c8608f55dbff3f Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 2 Oct 2020 13:41:33 +0300 Subject: CMake: set default eglfs device integration plugin Use QT_QPA_DEFAULT_EGLFS_INTEGRATION for setting the default eglfs device integration plugin, which can be overwritten at runtime using QT_QPA_EGLFS_INTEGRATION environment variable. Change-Id: I1c3ac0c58cdbbb7bb08c2f0ea5abe4d04eb8d61a Reviewed-by: Alexandru Croitor --- src/plugins/platforms/eglfs/CMakeLists.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/eglfs/CMakeLists.txt b/src/plugins/platforms/eglfs/CMakeLists.txt index 00b24aa03c..81b53ee234 100644 --- a/src/plugins/platforms/eglfs/CMakeLists.txt +++ b/src/plugins/platforms/eglfs/CMakeLists.txt @@ -1,5 +1,19 @@ # Generated from eglfs.pro. -qt_find_package(EGL) # special case +# special case begin +qt_find_package(EGL) + +if(QT_FEATURE_eglfs_gbm) + set(_device_integration "eglfs_kms") +elseif(QT_FEATURE_eglfs_egldevice) + set(_device_integration "eglfs_kms_egldevice") +elseif(QT_FEATURE_eglfs_viv) + set(_device_integration "eglfs_viv") +elseif(QT_FEATURE_eglfs_brcm) + set(_device_integration "eglfs_brcm") +endif() + +set(QT_QPA_DEFAULT_EGLFS_INTEGRATION "${_device_integration}" CACHE STRING "Default EGLFS device integration plugin") +# special case end ##################################################################### ## EglFSDeviceIntegration Module: @@ -18,6 +32,7 @@ qt_internal_add_module(EglFSDeviceIntegration DEFINES QT_BUILD_EGL_DEVICE_LIB QT_EGL_NO_X11 + EGLFS_PREFERRED_PLUGIN=${QT_QPA_DEFAULT_EGLFS_INTEGRATION} # special case INCLUDE_DIRECTORIES api PUBLIC_LIBRARIES -- cgit v1.2.3