8e6fbc6c6371c2637568fa02366a9994e403f620
[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
25 HEADERS = \
26         qxcbclipboard.h \
27         qxcbconnection.h \
28         qxcbintegration.h \
29         qxcbkeyboard.h \
30         qxcbdrag.h \
31         qxcbmime.h \
32         qxcbobject.h \
33         qxcbscreen.h \
34         qxcbwindow.h \
35         qxcbbackingstore.h \
36         qxcbwmsupport.h \
37         qxcbnativeinterface.h \
38         qxcbcursor.h \
39         qxcbimage.h
40
41 contains(QT_CONFIG, xcb-poll-for-queued-event) {
42     DEFINES += XCB_POLL_FOR_QUEUED_EVENT
43 }
44
45 # needed by GLX, Xcursor, XLookupString, ...
46 contains(QT_CONFIG, xcb-xlib) {
47     DEFINES += XCB_USE_XLIB
48     !contains(DEFINES, QT_NO_SHAPE):LIBS += -lXext
49     LIBS += -lX11 -lX11-xcb
50
51     linux-g++-maemo {
52         contains(QT_CONFIG, xinput2) {
53             # XInput2 support for Harmattan.
54             DEFINES += XCB_USE_XINPUT2_MAEMO
55             SOURCES += qxcbconnection_maemo.cpp
56             LIBS += -lXi
57         }
58         DEFINES += XCB_USE_MAEMO_WINDOW_PROPERTIES
59     }
60 }
61
62 # to support custom cursors with depth > 1
63 contains(QT_CONFIG, xcb-render) {
64     DEFINES += XCB_USE_RENDER
65     LIBS += -lxcb-render -lxcb-render-util -lXrender
66 }
67
68 #    DEFINES += XCB_USE_DRI2
69 contains(DEFINES, XCB_USE_DRI2) {
70     LIBS += -lxcb-dri2 -lEGL
71
72     CONFIG += link_pkgconfig
73     PKGCONFIG += libdrm
74
75     HEADERS += qdri2context.h
76     SOURCES += qdri2context.cpp
77
78 } else:contains(QT_CONFIG, opengl) {
79     contains(QT_CONFIG, opengles2) {
80         DEFINES += XCB_USE_EGL
81         LIBS += -lEGL
82         HEADERS += qxcbeglsurface.h
83
84         # EGL on MeeGo 1.2 Harmattan needs this macro to map EGLNativeDisplayType
85         # and other types to the correct X11 types
86         DEFINES += SUPPORT_X11
87     } else:contains(QT_CONFIG, xcb-xlib) {
88         DEFINES += XCB_USE_GLX
89         HEADERS += qglxintegration.h
90         SOURCES += qglxintegration.cpp
91         LIBS += $$QMAKE_LIBS_DYNLOAD
92     }
93 }
94
95 LIBS += -lxcb -lxcb-image -lxcb-keysyms -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shape -lxcb-shm -lxcb-randr
96
97 DEFINES += $$QMAKE_DEFINES_XCB
98 LIBS += $$QMAKE_LIBS_XCB
99 QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
100
101 CONFIG += qpa/genericunixfontdatabase
102
103 contains(QT_CONFIG, dbus) {
104 DEFINES += XCB_USE_IBUS
105 QT += dbus
106 LIBS += -ldbus-1
107 }
108
109 OTHER_FILES += xcb.json
110
111 target.path += $$[QT_INSTALL_PLUGINS]/platforms
112 INSTALLS += target