diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f48aebabc..efa813eb6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -826,6 +826,7 @@ endif() add_subdirectory(platformsupport) add_subdirectory(plugins) +target_link_libraries(kwin_wayland KWinQpaPlugin) ########### install files ############### diff --git a/autotests/integration/CMakeLists.txt b/autotests/integration/CMakeLists.txt index 422fd26aac..9db3bf486c 100644 --- a/autotests/integration/CMakeLists.txt +++ b/autotests/integration/CMakeLists.txt @@ -26,7 +26,7 @@ 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) +target_link_libraries(KWinIntegrationTestFramework kwin Qt5::Test Wayland::Client KWinQpaPlugin) function(integrationTest) set(optionArgs WAYLAND_ONLY) diff --git a/autotests/integration/kwin_wayland_test.cpp b/autotests/integration/kwin_wayland_test.cpp index a1aff34235..780bff9220 100644 --- a/autotests/integration/kwin_wayland_test.cpp +++ b/autotests/integration/kwin_wayland_test.cpp @@ -30,6 +30,8 @@ #include #include +Q_IMPORT_PLUGIN(KWinIntegrationPlugin) + namespace KWin { diff --git a/main_wayland.cpp b/main_wayland.cpp index 8a4cd1f915..89efc46e0a 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -60,6 +60,8 @@ #include #include +Q_IMPORT_PLUGIN(KWinIntegrationPlugin) + namespace KWin { diff --git a/plugins/qpa/CMakeLists.txt b/plugins/qpa/CMakeLists.txt index 1eca68dbc0..9dcca439b2 100644 --- a/plugins/qpa/CMakeLists.txt +++ b/plugins/qpa/CMakeLists.txt @@ -16,8 +16,8 @@ set(QPA_SOURCES include(ECMQtDeclareLoggingCategory) 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}) -set_target_properties(KWinQpaPlugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/platforms/") +add_library(KWinQpaPlugin OBJECT ${QPA_SOURCES}) +target_compile_definitions(KWinQpaPlugin PRIVATE QT_STATICPLUGIN) set(QT5PLATFORMSUPPORT_LIBS Qt5::FontDatabaseSupportPrivate @@ -31,10 +31,3 @@ target_link_libraries(KWinQpaPlugin Fontconfig::Fontconfig kwin ) - -install( - TARGETS - KWinQpaPlugin - DESTINATION - ${PLUGIN_INSTALL_DIR}/platforms/ -)