summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/eglfs/CMakeLists.txt')
-rw-r--r--src/plugins/platforms/eglfs/CMakeLists.txt90
1 files changed, 42 insertions, 48 deletions
diff --git a/src/plugins/platforms/eglfs/CMakeLists.txt b/src/plugins/platforms/eglfs/CMakeLists.txt
index 03de79d6f0..a0a6116a45 100644
--- a/src/plugins/platforms/eglfs/CMakeLists.txt
+++ b/src/plugins/platforms/eglfs/CMakeLists.txt
@@ -1,11 +1,27 @@
-# Generated from eglfs.pro.
-qt_find_package(EGL) # special case
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+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")
+elseif(QT_FEATURE_eglfs_openwfd)
+ set(_device_integration "eglfs_openwfd")
+endif()
+
+set(QT_QPA_DEFAULT_EGLFS_INTEGRATION "${_device_integration}" CACHE STRING "Default EGLFS device integration plugin")
#####################################################################
-## EglFSDeviceIntegration Module:
+## EglFSDeviceIntegrationPrivate Module:
#####################################################################
-qt_add_module(EglFSDeviceIntegration
+qt_internal_add_module(EglFSDeviceIntegrationPrivate
INTERNAL_MODULE
SOURCES
api/qeglfsdeviceintegration.cpp api/qeglfsdeviceintegration_p.h
@@ -18,57 +34,50 @@ qt_add_module(EglFSDeviceIntegration
DEFINES
QT_BUILD_EGL_DEVICE_LIB
QT_EGL_NO_X11
+ QT_NO_FOREACH
+ EGLFS_PREFERRED_PLUGIN=${QT_QPA_DEFAULT_EGLFS_INTEGRATION}
INCLUDE_DIRECTORIES
api
PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::DeviceDiscoverySupportPrivate
- Qt::EglSupportPrivate
- Qt::EventDispatcherSupportPrivate
Qt::FbSupportPrivate
- Qt::FontDatabaseSupportPrivate
Qt::GuiPrivate
- Qt::ServiceSupportPrivate
- Qt::ThemeSupportPrivate
- EGL::EGL # special case
+ EGL::EGL
+ HEADER_SYNC_SOURCE_DIRECTORY
+ "${CMAKE_CURRENT_SOURCE_DIR}/api"
+ NO_GENERATE_CPP_EXPORTS
)
-#### Keys ignored in scope 2:.:.:eglfsdeviceintegration.pro:<TRUE>:
-# MODULE = "eglfsdeviceintegration"
-
## Scopes:
#####################################################################
-qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::InputSupportPrivate
+qt_internal_extend_target(EglFSDeviceIntegrationPrivate CONDITION TARGET Qt::InputSupportPrivate
PUBLIC_LIBRARIES
Qt::InputSupportPrivate
)
-qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::PlatformCompositorSupportPrivate
- PUBLIC_LIBRARIES
- Qt::PlatformCompositorSupportPrivate
+qt_internal_extend_target(EglFSDeviceIntegrationPrivate CONDITION INTEGRITY AND TARGET IntegrityPlatformGraphics::IntegrityPlatformGraphics
+ LIBRARIES
+ IntegrityPlatformGraphics::IntegrityPlatformGraphics
)
-qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_vulkan
+qt_internal_extend_target(EglFSDeviceIntegrationPrivate CONDITION QT_FEATURE_opengl
SOURCES
- api/vulkan/qeglfsvulkaninstance.cpp api/vulkan/qeglfsvulkaninstance_p.h
- api/vulkan/qeglfsvulkanwindow.cpp api/vulkan/qeglfsvulkanwindow_p.h
+ api/qeglfscontext.cpp api/qeglfscontext_p.h
+ api/qeglfscursor.cpp api/qeglfscursor_p.h
PUBLIC_LIBRARIES
- Qt::VulkanSupportPrivate
+ Qt::OpenGLPrivate
)
-# special case:
-# extend_target(EglFSDeviceIntegration CONDITION NOT EGLFS_PLATFORM_HOOKS_SOURCES_ISEMPTY ...
-# extend_target(EglFSDeviceIntegration CONDITION NOT EGLFS_DEVICE_INTEGRATION_ISEMPTY ...
-
-if(QT_FEATURE_cursor) # special case
+if(QT_FEATURE_cursor)
# Resources:
set(cursor_resource_files
"cursor-atlas.png"
"cursor.json"
)
- qt_add_resource(EglFSDeviceIntegration "cursor"
+ qt_internal_add_resource(EglFSDeviceIntegrationPrivate "cursor"
PREFIX
"/"
FILES
@@ -76,37 +85,22 @@ if(QT_FEATURE_cursor) # special case
)
endif()
-qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_opengl
- SOURCES
- api/qeglfscontext.cpp api/qeglfscontext_p.h
- api/qeglfscursor.cpp api/qeglfscursor_p.h
-)
#####################################################################
## QEglFSIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QEglFSIntegrationPlugin
+qt_internal_add_plugin(QEglFSIntegrationPlugin
OUTPUT_NAME qeglfs
- TYPE platforms
- DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES eglfs # special case
+ PLUGIN_TYPE platforms
+ DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES eglfs
SOURCES
qeglfsmain.cpp
DEFINES
QT_EGL_NO_X11
- INCLUDE_DIRECTORIES
- api
- PUBLIC_LIBRARIES
- Qt::CorePrivate # special case
+ LIBRARIES
+ Qt::CorePrivate
Qt::EglFSDeviceIntegrationPrivate
- EGL::EGL # special case
+ EGL::EGL
)
-#### Keys ignored in scope 13:.:.:eglfs-plugin.pro:<TRUE>:
-# OTHER_FILES = "$$PWD/eglfs.json"
-
-## Scopes:
-#####################################################################
-
-#### Keys ignored in scope 14:.:.:eglfs-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
-# PLUGIN_EXTENDS = "-"
add_subdirectory(deviceintegration)