summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/CMakeLists.txt
blob: c8b398e7a29c762d692d9bf351f1d623407f43b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Generated from eglfs.pro.
# 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")
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")
# special case end

#####################################################################
## EglFSDeviceIntegrationPrivate Module:
#####################################################################

qt_internal_add_module(EglFSDeviceIntegrationPrivate
    INTERNAL_MODULE
    SOURCES
        api/qeglfsdeviceintegration.cpp api/qeglfsdeviceintegration_p.h
        api/qeglfsglobal_p.h
        api/qeglfshooks.cpp api/qeglfshooks_p.h
        api/qeglfsintegration.cpp api/qeglfsintegration_p.h
        api/qeglfsoffscreenwindow.cpp api/qeglfsoffscreenwindow_p.h
        api/qeglfsscreen.cpp api/qeglfsscreen_p.h
        api/qeglfswindow.cpp api/qeglfswindow_p.h
    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
        Qt::CorePrivate
        Qt::DeviceDiscoverySupportPrivate
        Qt::FbSupportPrivate
        Qt::GuiPrivate
        EGL::EGL # special case
)

#### Keys ignored in scope 2:.:.:eglfsdeviceintegration.pro:<TRUE>:
# MODULE = "eglfsdeviceintegration"

## Scopes:
#####################################################################

qt_internal_extend_target(EglFSDeviceIntegrationPrivate CONDITION TARGET Qt::InputSupportPrivate
    PUBLIC_LIBRARIES
        Qt::InputSupportPrivate
)

qt_internal_extend_target(EglFSDeviceIntegrationPrivate CONDITION INTEGRITY AND TARGET IntegrityPlatformGraphics::IntegrityPlatformGraphics
    LIBRARIES
        IntegrityPlatformGraphics::IntegrityPlatformGraphics
)

qt_internal_extend_target(EglFSDeviceIntegrationPrivate CONDITION QT_FEATURE_opengl
    SOURCES
        api/qeglfscontext.cpp api/qeglfscontext_p.h
        api/qeglfscursor.cpp api/qeglfscursor_p.h
    PUBLIC_LIBRARIES
        Qt::OpenGLPrivate
)

# special case begin
# comment out
#qt_internal_extend_target(EglFSDeviceIntegrationPrivate CONDITION NOT EGLFS_PLATFORM_HOOKS_SOURCES_ISEMPTY
    #DEFINES
        #EGLFS_PLATFORM_HOOKS
#)

#qt_internal_extend_target(EglFSDeviceIntegrationPrivate CONDITION NOT EGLFS_DEVICE_INTEGRATION_ISEMPTY
    #DEFINES
        #EGLFS_PREFERRED_PLUGIN=
#)
# special case end

if(QT_FEATURE_cursor)
    # Resources:
    set(cursor_resource_files
        "cursor-atlas.png"
        "cursor.json"
    )

    qt_internal_add_resource(EglFSDeviceIntegrationPrivate "cursor"
        PREFIX
            "/"
        FILES
            ${cursor_resource_files}
    )
endif()

#####################################################################
## QEglFSIntegrationPlugin Plugin:
#####################################################################

qt_internal_add_plugin(QEglFSIntegrationPlugin
    OUTPUT_NAME qeglfs
    PLUGIN_TYPE platforms
    DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES eglfs # special case
    SOURCES
        qeglfsmain.cpp
    DEFINES
        QT_EGL_NO_X11
    LIBRARIES
        Qt::CorePrivate # special case
        Qt::EglFSDeviceIntegrationPrivate
        EGL::EGL # special case
)

#### Keys ignored in scope 12:.:.:eglfs-plugin.pro:<TRUE>:
# OTHER_FILES = "$$PWD/eglfs.json"

## Scopes:
#####################################################################

#### Keys ignored in scope 13:.:.:eglfs-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
# PLUGIN_EXTENDS = "-"
add_subdirectory(deviceintegration)