2220ae44c4
Each of the backends becomes a plugin. This allows kwin_wayland to load the requested plugin and kwin itself doesn't need to link all the libraries needed. E.g. libdrm is no longer linked if running kwin_x11. Also this allows to create backends for the non-standard EGL platforms (examples could be raspberrypi or Android devices).
23 lines
661 B
CMake
23 lines
661 B
CMake
set(WAYLAND_BACKEND_SOURCES
|
|
logging.cpp
|
|
scene_qpainter_wayland_backend.cpp
|
|
screens_wayland.cpp
|
|
wayland_backend.cpp
|
|
)
|
|
if(KWIN_HAVE_EGL AND Wayland_Egl_FOUND)
|
|
set(WAYLAND_BACKEND_SOURCES ${WAYLAND_BACKEND_SOURCES} egl_wayland_backend.cpp)
|
|
endif()
|
|
|
|
add_library(KWinWaylandWaylandBackend MODULE ${WAYLAND_BACKEND_SOURCES})
|
|
target_link_libraries(KWinWaylandWaylandBackend kwin KF5::WaylandClient)
|
|
|
|
if(KWIN_HAVE_EGL AND Wayland_Egl_FOUND)
|
|
target_link_libraries(KWinWaylandWaylandBackend Wayland::Egl)
|
|
endif()
|
|
|
|
install(
|
|
TARGETS
|
|
KWinWaylandWaylandBackend
|
|
DESTINATION
|
|
${PLUGIN_INSTALL_DIR}/org.kde.kwin.waylandbackends/
|
|
)
|