summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/gl_integration/gl_integration.pri
blob: d9b5fa9bff4282ea23cfdc715e61fc611378f7c6 (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
contains(QT_CONFIG, opengl) {
    DEFINES += QT_WAYLAND_GL_SUPPORT
    QT += opengl

HEADERS += \
    $$PWD/qwaylandglintegration.h \
    $$PWD/qwaylandglwindowsurface.h

SOURCES += \
    $$PWD/qwaylandglintegration.cpp \
    $$PWD/qwaylandglwindowsurface.cpp

    QT_WAYLAND_GL_CONFIG = $$(QT_WAYLAND_GL_CONFIG)
    contains(QT_CONFIG, opengles2) {
        isEqual(QT_WAYLAND_GL_CONFIG, wayland_egl) {
            QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
            CONFIG += wayland_egl
        } else:isEqual(QT_WAYLAND_GL_CONFIG,readback) {
            QT_WAYLAND_GL_INTEGRATION = readback_egl
            CONFIG += readback_egl
        } else {
            QT_WAYLAND_GL_INTEGRATION = xcomposite_egl
            CONFIG += xcomposite_egl
        }
    } else {
        isEqual(QT_WAYLAND_GL_CONFIG, readback) {
            QT_WAYLAND_GL_INTEGRATION = readback_glx
            CONFIG += readback_glx
        } else {
            QT_WAYLAND_GL_INTEGRATION = xcomposite_glx
            CONFIG += xcomposite_glx
        }
    }

    message("Wayland GL Integration: $$QT_WAYLAND_GL_INTEGRATION")
}


wayland_egl {
    include ($$PWD/wayland_egl/wayland_egl.pri)
}

readback_egl {
    include ($$PWD/readback_egl/readback_egl.pri)
}

readback_glx {
    include ($$PWD/readback_glx/readback_glx.pri)
}

xcomposite_glx {
    include ($$PWD/xcomposite_glx/xcomposite_glx.pri)
}

xcomposite_egl {
    include ($$PWD/xcomposite_egl/xcomposite_egl.pri)
}