wayland: Link statically KGlobalAccel integration plugin

Without the KGlobalAccel integration plugin, Wayland experience will be
negatively affected. Therefore it makes little sense to load it at run-
time.
This commit is contained in:
Vlad Zahorodnii 2020-11-21 12:16:59 +02:00
parent 07c994fb82
commit 49e0b84d84
6 changed files with 20 additions and 16 deletions

View file

@ -826,7 +826,11 @@ endif()
add_subdirectory(platformsupport)
add_subdirectory(plugins)
target_link_libraries(kwin_wayland KWinQpaPlugin)
target_link_libraries(kwin_wayland
KWinQpaPlugin
KF5GlobalAccelPrivateKWin
)
########### install files ###############

View file

@ -26,7 +26,15 @@ ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework_SOURCES
BASENAME xdg-shell
)
add_library(KWinIntegrationTestFramework STATIC ${KWinIntegrationTestFramework_SOURCES})
target_link_libraries(KWinIntegrationTestFramework kwin Qt5::Test Wayland::Client KWinQpaPlugin)
target_link_libraries(KWinIntegrationTestFramework
Qt5::Test
kwin
Wayland::Client
# Static plugins
KWinQpaPlugin
KF5GlobalAccelPrivateKWin
)
function(integrationTest)
set(optionArgs WAYLAND_ONLY)

View file

@ -31,6 +31,7 @@
#include <iostream>
Q_IMPORT_PLUGIN(KWinIntegrationPlugin)
Q_IMPORT_PLUGIN(KGlobalAccelImpl)
namespace KWin
{

View file

@ -61,6 +61,7 @@
#include <iomanip>
Q_IMPORT_PLUGIN(KWinIntegrationPlugin)
Q_IMPORT_PLUGIN(KGlobalAccelImpl)
namespace KWin
{

View file

@ -2,16 +2,6 @@ set(kglobalaccel_plugin_SRCS
kglobalaccel_plugin.cpp
)
add_library(KF5GlobalAccelPrivateKWin MODULE ${kglobalaccel_plugin_SRCS})
set_target_properties(KF5GlobalAccelPrivateKWin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kglobalaccel5.platforms/")
target_link_libraries(KF5GlobalAccelPrivateKWin
KF5::GlobalAccelPrivate
kwin
)
install(
TARGETS
KF5GlobalAccelPrivateKWin
DESTINATION
${PLUGIN_INSTALL_DIR}/org.kde.kglobalaccel5.platforms/
)
add_library(KF5GlobalAccelPrivateKWin OBJECT ${kglobalaccel_plugin_SRCS})
target_compile_definitions(KF5GlobalAccelPrivateKWin PRIVATE QT_STATICPLUGIN)
target_link_libraries(KF5GlobalAccelPrivateKWin KF5::GlobalAccelPrivate kwin)

View file

@ -16,7 +16,7 @@
class KGlobalAccelImpl : public KGlobalAccelInterface
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.kde.kglobalaccel5.KGlobalAccelInterface" FILE "kwin.json")
Q_PLUGIN_METADATA(IID KGlobalAccelInterface_iid FILE "kwin.json")
Q_INTERFACES(KGlobalAccelInterface)
public: