cmake: Move base render backend classes to libkwin
This allows using base opengl backends in libkwin, which can be useful later on for the purpose of moving the ownership of render backends from the Scene class to the Compositor class.
This commit is contained in:
parent
c5477011ed
commit
3485eb6200
21 changed files with 23 additions and 59 deletions
|
@ -38,7 +38,7 @@ endif()
|
|||
|
||||
add_library(KWinWaylandDrmBackend MODULE ${DRM_SOURCES})
|
||||
set_target_properties(KWinWaylandDrmBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
|
||||
target_link_libraries(KWinWaylandDrmBackend kwin Libdrm::Libdrm SceneQPainterBackend SceneOpenGLBackend VsyncSupport)
|
||||
target_link_libraries(KWinWaylandDrmBackend kwin Libdrm::Libdrm VsyncSupport)
|
||||
|
||||
if (HAVE_GBM)
|
||||
target_link_libraries(KWinWaylandDrmBackend gbm::gbm)
|
||||
|
|
|
@ -6,7 +6,7 @@ set(FBDEV_SOURCES
|
|||
|
||||
add_library(KWinWaylandFbdevBackend MODULE ${FBDEV_SOURCES})
|
||||
set_target_properties(KWinWaylandFbdevBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
|
||||
target_link_libraries(KWinWaylandFbdevBackend kwin SceneQPainterBackend VsyncSupport)
|
||||
target_link_libraries(KWinWaylandFbdevBackend kwin VsyncSupport)
|
||||
|
||||
install(
|
||||
TARGETS
|
||||
|
|
|
@ -10,7 +10,7 @@ ecm_qt_declare_logging_category(VIRTUAL_SOURCES HEADER logging.h IDENTIFIER KWIN
|
|||
|
||||
add_library(KWinWaylandVirtualBackend MODULE ${VIRTUAL_SOURCES})
|
||||
set_target_properties(KWinWaylandVirtualBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
|
||||
target_link_libraries(KWinWaylandVirtualBackend kwin SceneQPainterBackend SceneOpenGLBackend VsyncSupport)
|
||||
target_link_libraries(KWinWaylandVirtualBackend kwin VsyncSupport)
|
||||
|
||||
install(
|
||||
TARGETS
|
||||
|
|
|
@ -14,10 +14,10 @@ endif()
|
|||
|
||||
add_library(KWinWaylandWaylandBackend MODULE ${WAYLAND_BACKEND_SOURCES})
|
||||
set_target_properties(KWinWaylandWaylandBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
|
||||
target_link_libraries(KWinWaylandWaylandBackend kwin KF5::WaylandClient SceneQPainterBackend)
|
||||
target_link_libraries(KWinWaylandWaylandBackend kwin KF5::WaylandClient)
|
||||
|
||||
if (HAVE_WAYLAND_EGL)
|
||||
target_link_libraries(KWinWaylandWaylandBackend SceneOpenGLBackend Wayland::Egl)
|
||||
target_link_libraries(KWinWaylandWaylandBackend Wayland::Egl)
|
||||
if (HAVE_GBM)
|
||||
target_link_libraries(KWinWaylandWaylandBackend gbm::gbm)
|
||||
endif()
|
||||
|
|
|
@ -5,4 +5,4 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-int-to-void-pointer-cast")
|
||||
endif()
|
||||
add_library(eglx11common STATIC eglonxbackend.cpp)
|
||||
target_link_libraries(eglx11common kwin SceneOpenGLBackend)
|
||||
target_link_libraries(eglx11common kwin)
|
||||
|
|
|
@ -17,7 +17,7 @@ set(X11PLATFORM_SOURCES
|
|||
|
||||
add_library(KWinX11Platform MODULE ${X11PLATFORM_SOURCES})
|
||||
set_target_properties(KWinX11Platform PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.platforms/")
|
||||
target_link_libraries(KWinX11Platform eglx11common kwin kwinxrenderutils SceneOpenGLBackend VsyncSupport Qt::X11Extras KF5::Crash X11::X11)
|
||||
target_link_libraries(KWinX11Platform eglx11common kwin kwinxrenderutils VsyncSupport Qt::X11Extras KF5::Crash X11::X11)
|
||||
if (X11_Xi_FOUND)
|
||||
target_sources(KWinX11Platform PRIVATE xinputintegration.cpp)
|
||||
target_link_libraries(KWinX11Platform X11::Xi)
|
||||
|
|
|
@ -8,7 +8,7 @@ set(X11BACKEND_SOURCES
|
|||
|
||||
add_library(KWinWaylandX11Backend MODULE ${X11BACKEND_SOURCES})
|
||||
set_target_properties(KWinWaylandX11Backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
|
||||
target_link_libraries(KWinWaylandX11Backend eglx11common kwin kwinxrenderutils X11::XCB SceneQPainterBackend SceneOpenGLBackend VsyncSupport X11::X11)
|
||||
target_link_libraries(KWinWaylandX11Backend eglx11common kwin kwinxrenderutils X11::XCB VsyncSupport X11::X11)
|
||||
if (X11_Xi_FOUND)
|
||||
target_link_libraries(KWinWaylandX11Backend X11::Xi)
|
||||
endif()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
set(SCENE_OPENGL_BACKEND_SRCS
|
||||
target_sources(kwin PRIVATE
|
||||
abstract_egl_backend.cpp
|
||||
basiceglsurfacetexture_internal.cpp
|
||||
basiceglsurfacetexture_wayland.cpp
|
||||
|
@ -9,19 +9,4 @@ set(SCENE_OPENGL_BACKEND_SRCS
|
|||
openglsurfacetexture_wayland.cpp
|
||||
openglsurfacetexture_x11.cpp
|
||||
)
|
||||
|
||||
include(ECMQtDeclareLoggingCategory)
|
||||
ecm_qt_declare_logging_category(SCENE_OPENGL_BACKEND_SRCS
|
||||
HEADER
|
||||
logging.h
|
||||
IDENTIFIER
|
||||
KWIN_OPENGL
|
||||
CATEGORY_NAME
|
||||
kwin_scene_opengl
|
||||
DEFAULT_SEVERITY
|
||||
Critical
|
||||
)
|
||||
|
||||
add_library(SceneOpenGLBackend STATIC ${SCENE_OPENGL_BACKEND_SRCS})
|
||||
target_link_libraries(SceneOpenGLBackend Qt::Core Qt::Widgets KF5::CoreAddons KF5::ConfigCore KF5::WindowSystem Plasma::KWaylandServer)
|
||||
target_include_directories(SceneOpenGLBackend PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src)
|
||||
target_include_directories(kwin PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "abstract_wayland_output.h"
|
||||
#include <KWaylandServer/display.h>
|
||||
// kwin libs
|
||||
#include <logging.h>
|
||||
#include <kwinglplatform.h>
|
||||
#include <kwinglutils.h>
|
||||
// Qt
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include "basiceglsurfacetexture_internal.h"
|
||||
#include "kwingltexture.h"
|
||||
#include "logging.h"
|
||||
#include "surfaceitem_internal.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QOpenGLFramebufferObject>
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "egl_dmabuf.h"
|
||||
#include "kwineglext.h"
|
||||
#include "kwingltexture.h"
|
||||
#include "logging.h"
|
||||
#include "surfaceitem_wayland.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include "egl_dmabuf.h"
|
||||
#include "drm_fourcc.h"
|
||||
#include "kwineglext.h"
|
||||
#include "logging.h"
|
||||
|
||||
#include "utils.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
*/
|
||||
#include "openglbackend.h"
|
||||
#include <kwineffects.h>
|
||||
#include <logging.h>
|
||||
|
||||
#include "screens.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <epoxy/gl.h>
|
||||
|
||||
|
|
|
@ -1,22 +1,7 @@
|
|||
set(SCENE_QPAINTER_BACKEND_SRCS
|
||||
target_sources(kwin PRIVATE
|
||||
qpaintersurfacetexture.cpp
|
||||
qpaintersurfacetexture_internal.cpp
|
||||
qpaintersurfacetexture_wayland.cpp
|
||||
qpainterbackend.cpp
|
||||
)
|
||||
|
||||
include(ECMQtDeclareLoggingCategory)
|
||||
ecm_qt_declare_logging_category(SCENE_QPAINTER_BACKEND_SRCS
|
||||
HEADER
|
||||
logging.h
|
||||
IDENTIFIER
|
||||
KWIN_QPAINTER
|
||||
CATEGORY_NAME
|
||||
kwin_scene_qpainter
|
||||
DEFAULT_SEVERITY
|
||||
Critical
|
||||
)
|
||||
|
||||
add_library(SceneQPainterBackend STATIC ${SCENE_QPAINTER_BACKEND_SRCS})
|
||||
target_link_libraries(SceneQPainterBackend Qt::Core KF5::CoreAddons KF5::ConfigCore KF5::WindowSystem Plasma::KWaylandServer)
|
||||
target_include_directories(SceneQPainterBackend PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src)
|
||||
target_include_directories(kwin PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "qpainterbackend.h"
|
||||
#include "qpaintersurfacetexture_internal.h"
|
||||
#include "qpaintersurfacetexture_wayland.h"
|
||||
#include <logging.h>
|
||||
#include "utils.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
|
|
|
@ -19,10 +19,7 @@ qt5_add_resources(SCENE_OPENGL_SRCS resources.qrc)
|
|||
|
||||
add_library(KWinSceneOpenGL MODULE ${SCENE_OPENGL_SRCS})
|
||||
set_target_properties(KWinSceneOpenGL PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.scenes/")
|
||||
target_link_libraries(KWinSceneOpenGL
|
||||
kwin
|
||||
SceneOpenGLBackend
|
||||
)
|
||||
target_link_libraries(KWinSceneOpenGL kwin)
|
||||
|
||||
install(
|
||||
TARGETS
|
||||
|
|
|
@ -15,10 +15,9 @@
|
|||
#include "screens.h"
|
||||
#include "unmanaged.h"
|
||||
#include "options.h"
|
||||
#include "utils.h"
|
||||
#include "workspace.h"
|
||||
|
||||
#include <logging.h>
|
||||
|
||||
#include <kwinglutils.h>
|
||||
#include <kwinglplatform.h>
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "surfaceitem.h"
|
||||
#include "windowitem.h"
|
||||
#include "abstract_output.h"
|
||||
#include <logging.h>
|
||||
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
|
|
|
@ -2,10 +2,7 @@ set(SCENE_QPAINTER_SRCS scene_qpainter.cpp)
|
|||
|
||||
add_library(KWinSceneQPainter MODULE scene_qpainter.cpp)
|
||||
set_target_properties(KWinSceneQPainter PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.scenes/")
|
||||
target_link_libraries(KWinSceneQPainter
|
||||
kwin
|
||||
SceneQPainterBackend
|
||||
)
|
||||
target_link_libraries(KWinSceneQPainter kwin)
|
||||
|
||||
install(
|
||||
TARGETS
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
#endif
|
||||
|
||||
Q_LOGGING_CATEGORY(KWIN_CORE, "kwin_core", QtWarningMsg)
|
||||
Q_LOGGING_CATEGORY(KWIN_OPENGL, "kwin_scene_opengl", QtWarningMsg)
|
||||
Q_LOGGING_CATEGORY(KWIN_QPAINTER, "kwin_scene_qpainter", QtWarningMsg)
|
||||
Q_LOGGING_CATEGORY(KWIN_VIRTUALKEYBOARD, "kwin_virtualkeyboard", QtWarningMsg)
|
||||
namespace KWin
|
||||
{
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
// system
|
||||
#include <climits>
|
||||
Q_DECLARE_LOGGING_CATEGORY(KWIN_CORE)
|
||||
Q_DECLARE_LOGGING_CATEGORY(KWIN_OPENGL)
|
||||
Q_DECLARE_LOGGING_CATEGORY(KWIN_QPAINTER)
|
||||
Q_DECLARE_LOGGING_CATEGORY(KWIN_VIRTUALKEYBOARD)
|
||||
namespace KWin
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue