TARGET = xcb
-load(qpa/plugin)
+load(qt_plugin)
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
-QT += core-private gui-private
+QT += core-private gui-private platformsupport-private
+
SOURCES = \
qxcbclipboard.cpp \
qxcbdrag.cpp \
qxcbscreen.cpp \
qxcbwindow.cpp \
- qxcbwindowsurface.cpp \
+ qxcbbackingstore.cpp \
qxcbwmsupport.cpp \
main.cpp \
- qxcbnativeinterface.cpp
+ qxcbnativeinterface.cpp \
+ qxcbcursor.cpp \
+ qxcbimage.cpp
HEADERS = \
qxcbclipboard.h \
qxcbobject.h \
qxcbscreen.h \
qxcbwindow.h \
- qxcbwindowsurface.h \
+ qxcbbackingstore.h \
qxcbwmsupport.h \
- qxcbnativeinterface.h
+ qxcbnativeinterface.h \
+ qxcbcursor.h \
+ qxcbimage.h
-QT += gui-private core-private
+contains(QT_CONFIG, xcb-poll-for-queued-event) {
+ DEFINES += XCB_POLL_FOR_QUEUED_EVENT
+}
-contains(QT_CONFIG, opengl) {
- QT += opengl
+# needed by GLX, Xcursor, XLookupString, ...
+contains(QT_CONFIG, xcb-xlib) {
+ DEFINES += XCB_USE_XLIB
+ !contains(DEFINES, QT_NO_SHAPE):LIBS += -lXext
+ LIBS += -lX11 -lX11-xcb
+
+ linux-g++-maemo {
+ contains(QT_CONFIG, xinput2) {
+ # XInput2 support for Harmattan.
+ DEFINES += XCB_USE_XINPUT2_MAEMO
+ SOURCES += qxcbconnection_maemo.cpp
+ LIBS += -lXi
+ }
+ DEFINES += XCB_USE_MAEMO_WINDOW_PROPERTIES
+ }
+}
+
+# to support custom cursors with depth > 1
+contains(QT_CONFIG, xcb-render) {
+ DEFINES += XCB_USE_RENDER
+ LIBS += -lxcb-render -lxcb-render-util -lXrender
+}
# DEFINES += XCB_USE_DRI2
- contains(DEFINES, XCB_USE_DRI2) {
- LIBS += -lxcb-dri2 -lxcb-xfixes -lEGL
-
- CONFIG += link_pkgconfig
- PKGCONFIG += libdrm
-
- HEADERS += qdri2context.h
- SOURCES += qdri2context.cpp
-
- } else {
- DEFINES += XCB_USE_XLIB
- LIBS += -lX11 -lX11-xcb
-
- contains(QT_CONFIG, opengles2) {
- DEFINES += XCB_USE_EGL
- load(qpa/egl/convenience)
- load(qpa/egl/context)
- load(qpa/egl/xlibintegration)
-
- LIBS += -lEGL
- } else {
- DEFINES += XCB_USE_GLX
- load(qpa/glx/convenience)
- HEADERS += qglxintegration.h
- SOURCES += qglxintegration.cpp
- }
+contains(DEFINES, XCB_USE_DRI2) {
+ LIBS += -lxcb-dri2 -lEGL
+
+ CONFIG += link_pkgconfig
+ PKGCONFIG += libdrm
+
+ HEADERS += qdri2context.h
+ SOURCES += qdri2context.cpp
+
+} else:contains(QT_CONFIG, opengl) {
+ contains(QT_CONFIG, opengles2) {
+ DEFINES += XCB_USE_EGL
+ LIBS += -lEGL
+ HEADERS += qxcbeglsurface.h
+
+ # EGL on MeeGo 1.2 Harmattan needs this macro to map EGLNativeDisplayType
+ # and other types to the correct X11 types
+ DEFINES += SUPPORT_X11
+ } else:contains(QT_CONFIG, xcb-xlib) {
+ DEFINES += XCB_USE_GLX
+ HEADERS += qglxintegration.h
+ SOURCES += qglxintegration.cpp
+ LIBS += $$QMAKE_LIBS_DYNLOAD
}
}
-LIBS += -lxcb -lxcb-image -lxcb-keysyms -lxcb-icccm -lxcb-sync
+LIBS += -lxcb -lxcb-image -lxcb-keysyms -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shape -lxcb-shm -lxcb-randr
-DEFINES += $$QMAKE_DEFINES_XCB QT_NO_XCB_XKB
+DEFINES += $$QMAKE_DEFINES_XCB
LIBS += $$QMAKE_LIBS_XCB
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
-load(qpa/fontdatabases/genericunix)
-load(qpa/printersupport/genericunix)
+CONFIG += qpa/genericunixfontdatabase
+
+contains(QT_CONFIG, dbus) {
+DEFINES += XCB_USE_IBUS
+QT += dbus
+LIBS += -ldbus-1
+}
+
+OTHER_FILES += xcb.json
target.path += $$[QT_INSTALL_PLUGINS]/platforms
INSTALLS += target