diff --git a/CMakeLists.txt b/CMakeLists.txt index ca3bfc1d35..6341db1a29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,8 @@ include(ECMConfiguredInstall) include(ECMQtDeclareLoggingCategory) include(ECMSetupQtPluginMacroNames) include(ECMSetupVersion) +include(ECMQmlModule) +include(ECMGenerateQmlTypes) option(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." ON) option(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON) diff --git a/src/plugins/private/CMakeLists.txt b/src/plugins/private/CMakeLists.txt index 80e9a84e22..67141caa5e 100644 --- a/src/plugins/private/CMakeLists.txt +++ b/src/plugins/private/CMakeLists.txt @@ -2,7 +2,15 @@ # # SPDX-License-Identifier: BSD-3-Clause -add_library(effectsplugin +ecm_add_qml_module(effectsplugin URI "org.kde.kwin.private.effects") + +ecm_target_qml_sources(effectsplugin + SOURCES + qml/WindowHeap.qml + qml/WindowHeapDelegate.qml +) + +target_sources(effectsplugin PRIVATE expoarea.cpp expolayout.cpp plugin.cpp @@ -10,13 +18,10 @@ add_library(effectsplugin target_link_libraries(effectsplugin kwineffects - - Qt::Core - Qt::Gui - Qt::Qml - Qt::Quick + Qt6::Quick + Qt6::Qml + KF6::I18n ) -install(DIRECTORY qml/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kwin/private/effects) -install(TARGETS effectsplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kwin/private/effects) -install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kwin/private/effects) +ecm_finalize_qml_module(effectsplugin DESTINATION ${KDE_INSTALL_QMLDIR}) + diff --git a/src/plugins/private/qmldir b/src/plugins/private/qmldir deleted file mode 100644 index 4dd3210d45..0000000000 --- a/src/plugins/private/qmldir +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Vlad Zahorodnii -# -# SPDX-License-Identifier: CC0-1.0 - -module org.kde.kwin.private.effects - -plugin effectsplugin -classname EffectKitExtensionPlugin - -WindowHeap 1.0 WindowHeap.qml -WindowHeapDelegate 1.0 WindowHeapDelegate.qml