Commit 5e60e64a authored by David Edmundson's avatar David Edmundson
Browse files

Bundle QPA plugin directly

On wayland, we know we're always going to load our internal QPA. Instead
of shipping a plugin and loading it dynamically we can use Qt static
plugins.

This should result in slightly faster load times, but also reduce the
number of moving pieces for kwin.

This also prevents anyone outside kwin loading our QPA which wouldn't
have made any sense and just crashed.
parent 786207a4
...@@ -826,6 +826,7 @@ endif() ...@@ -826,6 +826,7 @@ endif()
add_subdirectory(platformsupport) add_subdirectory(platformsupport)
add_subdirectory(plugins) add_subdirectory(plugins)
target_link_libraries(kwin_wayland KWinQpaPlugin)
########### install files ############### ########### install files ###############
......
...@@ -26,7 +26,7 @@ ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework_SOURCES ...@@ -26,7 +26,7 @@ ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework_SOURCES
BASENAME xdg-shell BASENAME xdg-shell
) )
add_library(KWinIntegrationTestFramework STATIC ${KWinIntegrationTestFramework_SOURCES}) add_library(KWinIntegrationTestFramework STATIC ${KWinIntegrationTestFramework_SOURCES})
target_link_libraries(KWinIntegrationTestFramework kwin Qt5::Test Wayland::Client) target_link_libraries(KWinIntegrationTestFramework kwin Qt5::Test Wayland::Client KWinQpaPlugin)
function(integrationTest) function(integrationTest)
set(optionArgs WAYLAND_ONLY) set(optionArgs WAYLAND_ONLY)
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <iostream> #include <iostream>
Q_IMPORT_PLUGIN(KWinIntegrationPlugin)
namespace KWin namespace KWin
{ {
......
...@@ -60,6 +60,8 @@ ...@@ -60,6 +60,8 @@
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
Q_IMPORT_PLUGIN(KWinIntegrationPlugin)
namespace KWin namespace KWin
{ {
......
...@@ -16,8 +16,8 @@ set(QPA_SOURCES ...@@ -16,8 +16,8 @@ set(QPA_SOURCES
include(ECMQtDeclareLoggingCategory) include(ECMQtDeclareLoggingCategory)
ecm_qt_declare_logging_category(QPA_SOURCES HEADER logging.h IDENTIFIER KWIN_QPA CATEGORY_NAME kwin_qpa_plugin DEFAULT_SEVERITY Critical) ecm_qt_declare_logging_category(QPA_SOURCES HEADER logging.h IDENTIFIER KWIN_QPA CATEGORY_NAME kwin_qpa_plugin DEFAULT_SEVERITY Critical)
add_library(KWinQpaPlugin MODULE ${QPA_SOURCES}) add_library(KWinQpaPlugin OBJECT ${QPA_SOURCES})
set_target_properties(KWinQpaPlugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/platforms/") target_compile_definitions(KWinQpaPlugin PRIVATE QT_STATICPLUGIN)
set(QT5PLATFORMSUPPORT_LIBS set(QT5PLATFORMSUPPORT_LIBS
Qt5::FontDatabaseSupportPrivate Qt5::FontDatabaseSupportPrivate
...@@ -31,10 +31,3 @@ target_link_libraries(KWinQpaPlugin ...@@ -31,10 +31,3 @@ target_link_libraries(KWinQpaPlugin
Fontconfig::Fontconfig Fontconfig::Fontconfig
kwin kwin
) )
install(
TARGETS
KWinQpaPlugin
DESTINATION
${PLUGIN_INSTALL_DIR}/platforms/
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment