Commit c38ee5cf authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use more centric code

parent ce6182b3
Pipeline #66397 canceled with stage
set(evolutionv1importer_SRCS
evolutionv1importdata.cpp
)
kcoreaddons_add_plugin(evolutionv1importerplugin JSON evolutionv1importer.json SOURCES
${evolutionv1importer_SRCS} INSTALL_NAMESPACE importwizard)
evolutionv1importdata.cpp INSTALL_NAMESPACE importwizard)
target_link_libraries(evolutionv1importerplugin
......
set(evolutionv2importer_SRCS
evolutionv2importdata.cpp
)
kcoreaddons_add_plugin(evolutionv2importerplugin JSON evolutionv2importer.json SOURCES
${evolutionv2importer_SRCS} INSTALL_NAMESPACE importwizard)
evolutionv2importdata.cpp INSTALL_NAMESPACE importwizard)
target_link_libraries(evolutionv2importerplugin
......
set(gearyimporter_SRCS
kcoreaddons_add_plugin(gearyimporterplugin JSON gearyimporter.json INSTALL_NAMESPACE importwizard)
target_sources(gearyimporterplugin PRIVATE
gearyaddressbook.cpp
gearyimportdata.cpp
gearysettings.cpp
)
ecm_qt_declare_logging_category(gearyimporter_SRCS HEADER gearyplugin_debug.h IDENTIFIER GEARYPLUGIN_LOG CATEGORY_NAME org.kde.pim.importwizard.gearyplugin)
kcoreaddons_add_plugin(gearyimporterplugin JSON gearyimporter.json SOURCES
${gearyimporter_SRCS} INSTALL_NAMESPACE importwizard)
ecm_qt_declare_logging_category(gearyimporterplugin HEADER gearyplugin_debug.h IDENTIFIER GEARYPLUGIN_LOG CATEGORY_NAME org.kde.pim.importwizard.gearyplugin)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(gearyimporterplugin PROPERTIES UNITY_BUILD ON)
endif()
......
set(nylasmailimporter_SRCS
kcoreaddons_add_plugin(nylasmailimporterplugin JSON nylasmailimporter.json INSTALL_NAMESPACE importwizard)
target_sources(nylasmailimporterplugin PRIVATE
nylasmailsettings.cpp
nylasmaildata.cpp
)
ecm_qt_declare_logging_category(nylasmailimporter_SRCS HEADER nylasmailplugin_debug.h IDENTIFIER NYLASMAILPLUGIN_LOG CATEGORY_NAME org.kde.pim.importwizard.nylasmailplugin)
kcoreaddons_add_plugin(nylasmailimporterplugin JSON nylasmailimporter.json SOURCES
${nylasmailimporter_SRCS} INSTALL_NAMESPACE importwizard)
ecm_qt_declare_logging_category(nylasmailimporterplugin HEADER nylasmailplugin_debug.h IDENTIFIER NYLASMAILPLUGIN_LOG CATEGORY_NAME org.kde.pim.importwizard.nylasmailplugin)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(nylasmailimporterplugin PROPERTIES UNITY_BUILD ON)
endif()
......
set(operaimporter_SRCS
kcoreaddons_add_plugin(operaimporterplugin JSON operaimporter.json INSTALL_NAMESPACE importwizard)
target_sources(operaimporterplugin PRIVATE
operaaddressbook.cpp
operaimportdata.cpp
operasettings.cpp
)
ecm_qt_declare_logging_category(operaimporter_SRCS HEADER operaplugin_debug.h IDENTIFIER OPERAPLUGIN_LOG CATEGORY_NAME org.kde.pim.importwizard.operaplugin)
kcoreaddons_add_plugin(operaimporterplugin JSON operaimporter.json SOURCES
${operaimporter_SRCS} INSTALL_NAMESPACE importwizard)
ecm_qt_declare_logging_category(operaimporterplugin HEADER operaplugin_debug.h IDENTIFIER OPERAPLUGIN_LOG CATEGORY_NAME org.kde.pim.importwizard.operaplugin)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(operaimporterplugin PROPERTIES UNITY_BUILD ON)
endif()
......
set(kmail_quicktextplugin_private_SRCS
add_library(kmailquicktextpluginprivate)
target_sources(kmailquicktextpluginprivate PRIVATE
quicktextmenu.cpp
quicktextconfigurewidget.cpp
quicktextconfiguredialog.cpp
......@@ -8,7 +9,6 @@ set(kmail_quicktextplugin_private_SRCS
)
add_library(kmailquicktextpluginprivate ${kmail_quicktextplugin_private_SRCS})
generate_export_header(kmailquicktextpluginprivate BASE_NAME quicktext)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(kmailquicktextpluginprivate PROPERTIES UNITY_BUILD ON)
......
set(kmail_automaticaddcontactseditorplugin_SRCS
kcoreaddons_add_plugin(kmail_automaticaddcontactseditorplugin JSON kmail_automaticaddcontactsplugin.json INSTALL_NAMESPACE kmail/plugincheckbeforesend)
target_sources(kmail_automaticaddcontactseditorplugin PRIVATE
automaticaddcontactsinterface.cpp
automaticaddcontactsplugin.cpp
automaticaddcontactsconfigurewidget.cpp
......@@ -8,15 +9,13 @@ set(kmail_automaticaddcontactseditorplugin_SRCS
automaticaddcontactsconfiguredialog.cpp
)
ecm_qt_declare_logging_category(kmail_automaticaddcontactseditorplugin_SRCS HEADER automaticaddcontactsplugin_debug.h IDENTIFIER KMAIL_EDITOR_AUTOMATICADDCONTACTS_PLUGIN_LOG CATEGORY_NAME org.kde.pim.kmail_automaticaddcontactsplugin
ecm_qt_declare_logging_category(kmail_automaticaddcontactseditorplugin HEADER automaticaddcontactsplugin_debug.h IDENTIFIER KMAIL_EDITOR_AUTOMATICADDCONTACTS_PLUGIN_LOG CATEGORY_NAME org.kde.pim.kmail_automaticaddcontactsplugin
DESCRIPTION "kdepim-addons (Automatic add contacts plugin)"
OLD_CATEGORY_NAMES log_kmail_automaticaddcontactsplugin
EXPORT KDEPIMADDONS
)
kcoreaddons_add_plugin(kmail_automaticaddcontactseditorplugin JSON kmail_automaticaddcontactsplugin.json SOURCES
${kmail_automaticaddcontactseditorplugin_SRCS} INSTALL_NAMESPACE kmail/plugincheckbeforesend)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(kmail_automaticaddcontactseditorplugin PROPERTIES UNITY_BUILD ON)
endif()
......
set(kmail_mailmergeplugin_SRCS
add_library(mailmerge)
target_sources(mailmerge PRIVATE
mailmergedialog.cpp
widgets/addressbookwidget.cpp
widgets/attachmentlistwidget.cpp
......@@ -11,7 +12,6 @@ set(kmail_mailmergeplugin_SRCS
widgets/mailmergepreviewwidget.cpp
)
add_library(mailmerge ${kmail_mailmergeplugin_SRCS})
generate_export_header(mailmerge BASE_NAME mailmerge)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(mailmerge PROPERTIES UNITY_BUILD ON)
......
......@@ -2,14 +2,7 @@ add_definitions (-DTRANSLATION_DOMAIN=\"pimeventsplugin\")
if (BUILD_TESTING)
add_subdirectory(autotests)
endif()
set(pimeventsplugin_SRCS
pimeventsplugin.cpp
akonadipimdatasource.cpp
eventdatavisitor.cpp
settingschangenotifier.cpp
eventmodel.cpp
)
kcoreaddons_add_plugin(pimevents JSON pimeventsplugin.json INSTALL_NAMESPACE plasmacalendarplugins)
ecm_qt_declare_logging_category(loggingcategory_SRCS
HEADER pimeventsplugin_debug.h
IDENTIFIER PIMEVENTSPLUGIN_LOG
......@@ -19,10 +12,15 @@ ecm_qt_declare_logging_category(loggingcategory_SRCS
EXPORT KDEPIMADDONS
)
target_sources(pimevents PRIVATE
pimeventsplugin.cpp
akonadipimdatasource.cpp
eventdatavisitor.cpp
settingschangenotifier.cpp
eventmodel.cpp
${loggingcategory_SRCS}
)
set(pimeventsplugins_full_SRCS ${pimeventsplugin_SRCS} ${loggingcategory_SRCS})
kcoreaddons_add_plugin(pimevents JSON pimeventsplugin.json SOURCES
${pimeventsplugins_full_SRCS} INSTALL_NAMESPACE plasmacalendarplugins)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(pimevents PROPERTIES UNITY_BUILD ON)
endif()
......@@ -42,13 +40,14 @@ target_link_libraries(pimevents
######################### NEXT TARGET #######################33
set(plasmapimcalendarsplugin_SRCS
add_library(pimcalendarsplugin SHARED)
target_sources(pimcalendarsplugin PRIVATE
pimcalendarsplugin.cpp
pimcalendarsmodel.cpp
settingschangenotifier.cpp
${loggingcategory_SRCS}
)
add_library(pimcalendarsplugin SHARED ${plasmapimcalendarsplugin_SRCS} ${loggingcategory_SRCS})
target_link_libraries(pimcalendarsplugin
Qt::Core
Qt::Qml
......
......@@ -12,8 +12,6 @@ ecm_qt_declare_logging_category(webengineviewer_adblockplugin HEADER adblockinte
target_link_libraries(webengineviewer_adblockplugin
KF5::MessageViewer
Qt::WebEngine
......
include_directories(${CMAKE_CURRENT_BINARY_DIR})
kcoreaddons_add_plugin(imapfoldercompletionplugin JSON imapfoldercompletion.json INSTALL_NAMESPACE libksieve)
set(sieveeditor_plugin_categories_SRCS)
ecm_qt_declare_logging_category(sieveeditor_plugin_categories_SRCS HEADER imapfoldercompletionplugin_debug.h IDENTIFIER
......@@ -14,7 +15,7 @@ if(BUILD_TESTING)
endif()
set(imapfoldercompletionplugin_SRCS
target_sources(imapfoldercompletionplugin PRIVATE
selectimapfolderdialog.cpp
selectimapfolderwidget.cpp
selectimapwidget.cpp
......@@ -27,8 +28,6 @@ set(imapfoldercompletionplugin_SRCS
${sieveeditor_plugin_categories_SRCS}
)
kcoreaddons_add_plugin(imapfoldercompletionplugin JSON imapfoldercompletion.json SOURCES
${imapfoldercompletionplugin_SRCS} INSTALL_NAMESPACE libksieve)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(imapfoldercompletionplugin PROPERTIES UNITY_BUILD ON)
endif()
......
set(sieveeditor_imapfoldercompletion_SRCS
add_executable(sieveeditorimapfoldercompletion_gui)
target_sources(sieveeditorimapfoldercompletion_gui PRIVATE
main.cpp
selectimapwidgettest.cpp
)
add_executable(sieveeditorimapfoldercompletion_gui ${sieveeditor_imapfoldercompletion_SRCS})
target_link_libraries(sieveeditorimapfoldercompletion_gui
KF5::PimCommon KF5::Completion KF5::I18n KF5::KSieveUi
)
......
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