Compile without OpenGL.
[profile/ivi/qtbase.git] / src / plugins / platforms / xcb / xcb.pro
1 TARGET = xcb
2
3 load(qt_plugin)
4 QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
5
6 QT += core-private gui-private platformsupport-private
7
8
9 SOURCES = \
10         qxcbclipboard.cpp \
11         qxcbconnection.cpp \
12         qxcbintegration.cpp \
13         qxcbkeyboard.cpp \
14         qxcbmime.cpp \
15         qxcbdrag.cpp \
16         qxcbscreen.cpp \
17         qxcbwindow.cpp \
18         qxcbbackingstore.cpp \
19         qxcbwmsupport.cpp \
20         main.cpp \
21         qxcbnativeinterface.cpp \
22         qxcbcursor.cpp \
23         qxcbimage.cpp \
24         qxcbsharedbuffermanager.cpp \
25         qxcbsharedgraphicscache.cpp
26
27 HEADERS = \
28         qxcbclipboard.h \
29         qxcbconnection.h \
30         qxcbintegration.h \
31         qxcbkeyboard.h \
32         qxcbdrag.h \
33         qxcbmime.h \
34         qxcbobject.h \
35         qxcbscreen.h \
36         qxcbwindow.h \
37         qxcbbackingstore.h \
38         qxcbwmsupport.h \
39         qxcbnativeinterface.h \
40         qxcbcursor.h \
41         qxcbimage.h \
42         qxcbsharedbuffermanager.h \
43         qxcbsharedgraphicscache.h
44
45 contains(QT_CONFIG, xcb-poll-for-queued-event) {
46     DEFINES += XCB_POLL_FOR_QUEUED_EVENT
47 }
48
49 # needed by GLX, Xcursor, XLookupString, ...
50 contains(QT_CONFIG, xcb-xlib) {
51     DEFINES += XCB_USE_XLIB
52     LIBS += -lX11 -lX11-xcb
53
54     linux-g++-maemo {
55         contains(QT_CONFIG, xinput2) {
56             # XInput2 support for Harmattan.
57             DEFINES += XCB_USE_XINPUT2_MAEMO
58             SOURCES += qxcbconnection_maemo.cpp
59             LIBS += -lXi
60         }
61         DEFINES += XCB_USE_MAEMO_WINDOW_PROPERTIES
62     }
63 }
64
65 # to support custom cursors with depth > 1
66 contains(QT_CONFIG, xcb-render) {
67     DEFINES += XCB_USE_RENDER
68     LIBS += -lxcb-render -lxcb-render-util -lXrender
69 }
70
71 #    DEFINES += XCB_USE_DRI2
72 contains(DEFINES, XCB_USE_DRI2) {
73     LIBS += -lxcb-dri2 -lEGL
74
75     CONFIG += link_pkgconfig
76     PKGCONFIG += libdrm
77
78     HEADERS += qdri2context.h
79     SOURCES += qdri2context.cpp
80
81 } else:contains(QT_CONFIG, opengl) {
82     contains(QT_CONFIG, opengles2) {
83         DEFINES += XCB_USE_EGL
84         LIBS += -lEGL
85         HEADERS += qxcbeglsurface.h
86
87         # EGL on MeeGo 1.2 Harmattan needs this macro to map EGLNativeDisplayType
88         # and other types to the correct X11 types
89         DEFINES += SUPPORT_X11
90     } else:contains(QT_CONFIG, xcb-xlib) {
91         DEFINES += XCB_USE_GLX
92         HEADERS += qglxintegration.h
93         SOURCES += qglxintegration.cpp
94     }
95 }
96
97 LIBS += -lxcb -lxcb-image -lxcb-keysyms -lxcb-icccm -lxcb-sync -lxcb-xfixes
98
99 DEFINES += $$QMAKE_DEFINES_XCB
100 LIBS += $$QMAKE_LIBS_XCB
101 QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
102
103 CONFIG += qpa/genericunixfontdatabase
104
105 contains(QT_CONFIG, dbus) {
106 DEFINES += XCB_USE_IBUS
107 QT += dbus
108 LIBS += -ldbus-1
109 }
110
111 target.path += $$[QT_INSTALL_PLUGINS]/platforms
112 INSTALLS += target