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).
24 lines
520 B
CMake
24 lines
520 B
CMake
set(DRM_SOURCES
|
|
drm_backend.cpp
|
|
logging.cpp
|
|
scene_qpainter_drm_backend.cpp
|
|
screens_drm.cpp
|
|
)
|
|
|
|
if(HAVE_GBM)
|
|
set(DRM_SOURCES ${DRM_SOURCES} egl_gbm_backend.cpp)
|
|
endif()
|
|
|
|
add_library(KWinWaylandDrmBackend MODULE ${DRM_SOURCES})
|
|
target_link_libraries(KWinWaylandDrmBackend kwin Libdrm::Libdrm)
|
|
|
|
if(HAVE_GBM)
|
|
target_link_libraries(KWinWaylandDrmBackend gbm::gbm)
|
|
endif()
|
|
|
|
install(
|
|
TARGETS
|
|
KWinWaylandDrmBackend
|
|
DESTINATION
|
|
${PLUGIN_INSTALL_DIR}/org.kde.kwin.waylandbackends/
|
|
)
|