From 8758f532ae6209bcf9447e27edc4fd412c0f173d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Wed, 10 Sep 2014 16:31:32 +0200 Subject: Make GLX and EGL dynamic dependencies for xcb [ChangeLog][QPA][Xcb] GLX and EGL code paths are now dynamically resolved, making it possible for one build of a plugin to use both code paths. Default is to use the GLX code path if available. This can be overwritten by specifying QT_XCB_GL_INTEGRATION=xcb_egl as an evnironment variable. Enable qt.xcb.glintegration.debug to get debug log output of what integration is used Change-Id: Ia9fa95fcca3d901b91dadb8c98a695fea0ae3b1e Reviewed-by: Laszlo Agocs --- src/plugins/platforms/xcb/xcb-plugin.pro | 116 +------------------------------ 1 file changed, 2 insertions(+), 114 deletions(-) (limited to 'src/plugins/platforms/xcb/xcb-plugin.pro') diff --git a/src/plugins/platforms/xcb/xcb-plugin.pro b/src/plugins/platforms/xcb/xcb-plugin.pro index f14fcde73f..8dfe08d413 100644 --- a/src/plugins/platforms/xcb/xcb-plugin.pro +++ b/src/plugins/platforms/xcb/xcb-plugin.pro @@ -5,122 +5,10 @@ PLUGIN_CLASS_NAME = QXcbIntegrationPlugin !equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = - load(qt_plugin) -QT += core-private gui-private platformsupport-private +QT += core-private gui-private platformsupport-private xcb_qpa_lib-private SOURCES = \ - qxcbclipboard.cpp \ - qxcbconnection.cpp \ - qxcbintegration.cpp \ - qxcbkeyboard.cpp \ - qxcbmime.cpp \ - qxcbdrag.cpp \ - qxcbscreen.cpp \ - qxcbwindow.cpp \ - qxcbbackingstore.cpp \ - qxcbwmsupport.cpp \ - qxcbmain.cpp \ - qxcbnativeinterface.cpp \ - qxcbcursor.cpp \ - qxcbimage.cpp \ - qxcbxsettings.cpp \ - qxcbsystemtraytracker.cpp - -HEADERS = \ - qxcbclipboard.h \ - qxcbconnection.h \ - qxcbintegration.h \ - qxcbkeyboard.h \ - qxcbdrag.h \ - qxcbmime.h \ - qxcbobject.h \ - qxcbscreen.h \ - qxcbwindow.h \ - qxcbbackingstore.h \ - qxcbwmsupport.h \ - qxcbnativeinterface.h \ - qxcbcursor.h \ - qxcbimage.h \ - qxcbxsettings.h \ - qxcbsystemtraytracker.h - -LIBS += $$QMAKE_LIBS_DYNLOAD - -# needed by GLX, Xcursor ... -contains(QT_CONFIG, xcb-xlib) { - DEFINES += XCB_USE_XLIB - LIBS += -lX11 -lX11-xcb - - contains(QT_CONFIG, xinput2) { - DEFINES += XCB_USE_XINPUT2 - SOURCES += qxcbconnection_xi2.cpp - LIBS += -lXi - } -} - -# to support custom cursors with depth > 1 -contains(QT_CONFIG, xcb-render) { - DEFINES += XCB_USE_RENDER - LIBS += -lxcb-render -lxcb-render-util -} - -# build with session management support -contains(QT_CONFIG, xcb-sm) { - DEFINES += XCB_USE_SM - LIBS += -lSM -lICE - SOURCES += qxcbsessionmanager.cpp - HEADERS += qxcbsessionmanager.h -} - -contains(QT_CONFIG, opengl) { - contains(QT_CONFIG, xcb-xlib):!contains(QT_CONFIG, opengles2) { - DEFINES += XCB_USE_GLX - HEADERS += qglxintegration.h - SOURCES += qglxintegration.cpp - LIBS += $$QMAKE_LIBS_DYNLOAD - contains(QT_CONFIG, xcb-glx) { - DEFINES += XCB_HAS_XCB_GLX - LIBS += -lxcb-glx - } - } else:contains(QT_CONFIG, egl):contains(QT_CONFIG, egl_x11) { - DEFINES += XCB_USE_EGL - CONFIG += egl - 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 - } -} - -DEFINES += $$QMAKE_DEFINES_XCB -LIBS += $$QMAKE_LIBS_XCB -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB -QMAKE_CFLAGS += $$QMAKE_CFLAGS_XCB - -CONFIG += qpa/genericunixfontdatabase - -contains(QT_CONFIG, dbus) { -QT += dbus -LIBS += -ldbus-1 -} + qxcbmain.cpp OTHER_FILES += xcb.json README -contains(QT_CONFIG, xcb-qt) { - DEFINES += XCB_USE_RENDER - XCB_DIR = ../../../3rdparty/xcb - INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude - LIBS += -lxcb -L$$OUT_PWD/xcb-static -lxcb-static -} else { - LIBS += -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-keysyms - !contains(DEFINES, QT_NO_XKB):LIBS += -lxcb-xkb -} - -# libxkbcommon -contains(QT_CONFIG, xkbcommon-qt): { - QT_CONFIG += use-xkbcommon-x11support - include(../../../3rdparty/xkbcommon.pri) -} else { - LIBS += $$QMAKE_LIBS_XKBCOMMON - QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XKBCOMMON -} -- cgit v1.2.3