summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-12 08:03:03 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-12 08:03:03 (GMT)
commit22077b86148dfe603c2c4d46dd4ca558cf5ef905 (patch)
tree815f841d60cb7f015be041185dbb093d35e30e9f
parent11bf7ac7332427adcdd0f17b6fd93e937962ea6c (diff)
Use macro to generate plugins
-rw-r--r--kmail/editorplugins/autocorrection/CMakeLists.txt4
-rw-r--r--kmail/editorplugins/changecase/CMakeLists.txt6
-rw-r--r--kmail/editorplugins/insertspecialcharacter/CMakeLists.txt5
3 files changed, 5 insertions, 10 deletions
diff --git a/kmail/editorplugins/autocorrection/CMakeLists.txt b/kmail/editorplugins/autocorrection/CMakeLists.txt
index 91aaff2..bcab744 100644
--- a/kmail/editorplugins/autocorrection/CMakeLists.txt
+++ b/kmail/editorplugins/autocorrection/CMakeLists.txt
@@ -3,14 +3,12 @@ set(kmail_autocorrectioneditorplugin_SRCS
autocorrectionplugineditorinterface.cpp
)
-add_library(kmail_autocorrectioneditorplugin MODULE ${kmail_autocorrectioneditorplugin_SRCS})
+kcoreaddons_add_plugin(kmail_autocorrectioneditorplugin JSON kmail_autocorrectioneditorplugin.json SOURCES ${kmail_autocorrectioneditorplugin_SRCS} INSTALL_NAMESPACE kmail)
target_link_libraries(kmail_autocorrectioneditorplugin
KF5::IconThemes KF5::MessageComposer KF5::XmlGui KF5::I18n
)
-install(TARGETS kmail_autocorrectioneditorplugin DESTINATION ${PLUGIN_INSTALL_DIR}/kmail)
-
if(BUILD_TESTING)
add_subdirectory(autotests)
endif()
diff --git a/kmail/editorplugins/changecase/CMakeLists.txt b/kmail/editorplugins/changecase/CMakeLists.txt
index 6f98644..27de71a 100644
--- a/kmail/editorplugins/changecase/CMakeLists.txt
+++ b/kmail/editorplugins/changecase/CMakeLists.txt
@@ -5,15 +5,13 @@ set(kmail_changecaseeditorplugin_SRCS
ecm_qt_declare_logging_category(kmail_changecaseeditorplugin_SRCS HEADER changecaseeditorplugin_debug.h IDENTIFIER KMAIL_EDITOR_CHANGECASE_PLUGIN_LOG CATEGORY_NAME log_kmail_changecaseeditorplugin)
-
-add_library(kmail_changecaseeditorplugin MODULE ${kmail_changecaseeditorplugin_SRCS})
+kcoreaddons_add_plugin(kmail_changecaseeditorplugin JSON kmail_changecaseeditorplugin.json SOURCES
+ ${kmail_changecaseeditorplugin_SRCS} INSTALL_NAMESPACE kmail)
target_link_libraries(kmail_changecaseeditorplugin
KF5::IconThemes KF5::MessageComposer KF5::XmlGui KF5::I18n
)
-install(TARGETS kmail_changecaseeditorplugin DESTINATION ${PLUGIN_INSTALL_DIR}/kmail)
-
if(BUILD_TESTING)
add_subdirectory(autotests)
endif()
diff --git a/kmail/editorplugins/insertspecialcharacter/CMakeLists.txt b/kmail/editorplugins/insertspecialcharacter/CMakeLists.txt
index d4a9ef0..34b37db 100644
--- a/kmail/editorplugins/insertspecialcharacter/CMakeLists.txt
+++ b/kmail/editorplugins/insertspecialcharacter/CMakeLists.txt
@@ -3,14 +3,13 @@ set(kmail_insertspecialcharactereditorplugin_SRCS
insertspecialcharacterplugineditorinterface.cpp
)
-add_library(kmail_insertspecialcharactereditorplugin MODULE ${kmail_insertspecialcharactereditorplugin_SRCS})
+kcoreaddons_add_plugin(kmail_insertspecialcharactereditorplugin JSON kmail_insertspecialcharactereditorplugin.json SOURCES
+ ${kmail_insertspecialcharactereditorplugin_SRCS} INSTALL_NAMESPACE kmail)
target_link_libraries(kmail_insertspecialcharactereditorplugin
KF5::IconThemes KF5::MessageComposer KF5::XmlGui KF5::I18n
)
-install(TARGETS kmail_insertspecialcharactereditorplugin DESTINATION ${PLUGIN_INSTALL_DIR}/kmail)
-
if(BUILD_TESTING)
add_subdirectory(autotests)
endif()