From 702b84b925d265fc6d5804ea654fa17f3d9daf3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 15 Apr 2016 09:11:30 +0200 Subject: [PATCH] Move the EglOnXBackend to the x11 platforms Summary: The EglOnXBackend is no longer needed in the core. It's only needed by the two x11 platform plugins. To best share it, it's moved into a common directory and compiled into a static library which in turn is linked by the two plugins. Reviewers: #plasma Subscribers: plasma-devel Projects: #plasma Differential Revision: https://phabricator.kde.org/D1413 --- CMakeLists.txt | 1 - plugins/platforms/x11/CMakeLists.txt | 1 + plugins/platforms/x11/common/CMakeLists.txt | 2 ++ .../platforms/x11/common/eglonxbackend.cpp | 2 ++ eglonxbackend.h => plugins/platforms/x11/common/eglonxbackend.h | 0 plugins/platforms/x11/standalone/CMakeLists.txt | 2 +- plugins/platforms/x11/windowed/CMakeLists.txt | 2 +- 7 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 plugins/platforms/x11/common/CMakeLists.txt rename eglonxbackend.cpp => plugins/platforms/x11/common/eglonxbackend.cpp (99%) rename eglonxbackend.h => plugins/platforms/x11/common/eglonxbackend.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62d52f0422..d97aa20aad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -407,7 +407,6 @@ set(kwin_KDEINIT_SRCS decorations/decorationrenderer.cpp decorations/decorations_logging.cpp abstract_egl_backend.cpp - eglonxbackend.cpp platform.cpp shell_client.cpp wayland_server.cpp diff --git a/plugins/platforms/x11/CMakeLists.txt b/plugins/platforms/x11/CMakeLists.txt index dde23c6df5..8addf0b52e 100644 --- a/plugins/platforms/x11/CMakeLists.txt +++ b/plugins/platforms/x11/CMakeLists.txt @@ -1,3 +1,4 @@ +add_subdirectory(common) add_subdirectory(standalone) if(X11_XCB_FOUND) add_subdirectory(windowed) diff --git a/plugins/platforms/x11/common/CMakeLists.txt b/plugins/platforms/x11/common/CMakeLists.txt new file mode 100644 index 0000000000..3b2d598bcf --- /dev/null +++ b/plugins/platforms/x11/common/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(eglx11common STATIC eglonxbackend.cpp) +target_link_libraries(eglx11common kwin) diff --git a/eglonxbackend.cpp b/plugins/platforms/x11/common/eglonxbackend.cpp similarity index 99% rename from eglonxbackend.cpp rename to plugins/platforms/x11/common/eglonxbackend.cpp index eca6e23291..07eec960ee 100644 --- a/eglonxbackend.cpp +++ b/plugins/platforms/x11/common/eglonxbackend.cpp @@ -32,6 +32,8 @@ along with this program. If not, see . // system #include +Q_LOGGING_CATEGORY(KWIN_CORE, "kwin_core", QtCriticalMsg) + namespace KWin { diff --git a/eglonxbackend.h b/plugins/platforms/x11/common/eglonxbackend.h similarity index 100% rename from eglonxbackend.h rename to plugins/platforms/x11/common/eglonxbackend.h diff --git a/plugins/platforms/x11/standalone/CMakeLists.txt b/plugins/platforms/x11/standalone/CMakeLists.txt index aec4039752..499bf19f35 100644 --- a/plugins/platforms/x11/standalone/CMakeLists.txt +++ b/plugins/platforms/x11/standalone/CMakeLists.txt @@ -9,7 +9,7 @@ if(HAVE_EPOXY_GLX) endif() add_library(KWinX11Platform MODULE ${X11PLATFORM_SOURCES}) -target_link_libraries(KWinX11Platform kwin Qt5::X11Extras) +target_link_libraries(KWinX11Platform eglx11common kwin Qt5::X11Extras) install( TARGETS diff --git a/plugins/platforms/x11/windowed/CMakeLists.txt b/plugins/platforms/x11/windowed/CMakeLists.txt index c0824b09b5..c4767c41ed 100644 --- a/plugins/platforms/x11/windowed/CMakeLists.txt +++ b/plugins/platforms/x11/windowed/CMakeLists.txt @@ -6,7 +6,7 @@ set(X11BACKEND_SOURCES ) add_library(KWinWaylandX11Backend MODULE ${X11BACKEND_SOURCES}) -target_link_libraries(KWinWaylandX11Backend kwin X11::XCB) +target_link_libraries(KWinWaylandX11Backend eglx11common kwin X11::XCB) install( TARGETS