Make wayland actually a module
[profile/ivi/qtwayland.git] / src / plugins / platforms / wayland / gl_integration / gl_integration.pri
1 contains(QT_CONFIG, opengl) {
2     DEFINES += QT_WAYLAND_GL_SUPPORT
3     QT += opengl
4
5 HEADERS += \
6     $$PWD/qwaylandglintegration.h
7
8 SOURCES += \
9     $$PWD/qwaylandglintegration.cpp
10
11     QT_WAYLAND_GL_CONFIG = $$(QT_WAYLAND_GL_CONFIG)
12     contains(QT_CONFIG, opengles2) {
13         isEqual(QT_WAYLAND_GL_CONFIG, xcomposite_egl) {
14             QT_WAYLAND_GL_INTEGRATION = xcomposite_egl
15             CONFIG += xcomposite_egl
16         } else:isEqual(QT_WAYLAND_GL_CONFIG,readback) {
17             QT_WAYLAND_GL_INTEGRATION = readback_egl
18             CONFIG += readback_egl
19         } else {
20             QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
21             CONFIG += wayland_egl
22         }
23     } else:mac {
24         QT_WAYLAND_GL_INTEGRATION = readback_cgl
25         CONFIG += readback_cgl
26     } else {
27         isEqual(QT_WAYLAND_GL_CONFIG, readback) {
28             QT_WAYLAND_GL_INTEGRATION = readback_glx
29             CONFIG += readback_glx
30         } else {
31             QT_WAYLAND_GL_INTEGRATION = xcomposite_glx
32             CONFIG += xcomposite_glx
33         }
34     }
35
36     message("Wayland GL Integration: $$QT_WAYLAND_GL_INTEGRATION")
37 }
38
39
40 wayland_egl {
41     include ($$PWD/wayland_egl/wayland_egl.pri)
42 }
43
44 readback_egl {
45     include ($$PWD/readback_egl/readback_egl.pri)
46 }
47
48 readback_glx {
49     include ($$PWD/readback_glx/readback_glx.pri)
50 }
51
52 readback_cgl {
53     include ($$PWD/readback_cgl/readback_cgl.pri)
54 }
55
56 xcomposite_glx {
57     include ($$PWD/xcomposite_glx/xcomposite_glx.pri)
58 }
59
60 xcomposite_egl {
61     include ($$PWD/xcomposite_egl/xcomposite_egl.pri)
62 }