Commit 005246fe authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to use UNITY build see...

Allow to use UNITY build see https://cmake.org/cmake/help/latest/prop_tgt/UNITY_BUILD.html (Reduce compile time. Need cmake 3.16.0)
parent 5b32d21c
Pipeline #44122 passed with stage
in 60 minutes and 10 seconds
......@@ -170,6 +170,16 @@ if(discount_FOUND)
endif()
endif()
option(USE_UNIFY_CMAKE_SUPPORT "Use UNIFY cmake support (speedup compile time)" FALSE)
set(COMPILE_WITH_CMAKE_SUPPORT false)
if (USE_UNIFY_CMAKE_SUPPORT)
if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
message(STATUS "CMAKE version is less than 3.16.0 . We can't use cmake unify build support")
else()
set(COMPILE_WITH_CMAKE_SUPPORT true)
endif()
endif()
add_subdirectory(plugins)
add_subdirectory(korganizer)
add_subdirectory(kmail)
......
......@@ -11,7 +11,9 @@ set(kaddressbook_importexport_csv_SRCS
kcoreaddons_add_plugin(kaddressbook_importexportcsvplugin JSON kaddressbook_importexportcsvplugin.json SOURCES
${kaddressbook_importexport_csv_SRCS} INSTALL_NAMESPACE kaddressbook/importexportplugin)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbook_importexportcsvplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbook_importexportcsvplugin
KPim::AddressbookImportExport
KF5::PimCommon
......
......@@ -11,7 +11,9 @@ ecm_qt_declare_logging_category(kaddressbook_importexport_gmx_SRCS HEADER kaddre
kcoreaddons_add_plugin(kaddressbook_importexportgmxplugin JSON kaddressbook_importexportgmxplugin.json SOURCES
${kaddressbook_importexport_gmx_SRCS} INSTALL_NAMESPACE kaddressbook/importexportplugin)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbook_importexportgmxplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbook_importexportgmxplugin
KPim::AddressbookImportExport
KF5::PimCommon
......
......@@ -6,6 +6,9 @@ set(kaddressbook_importexport_ldap_SRCS
kcoreaddons_add_plugin(kaddressbook_importexportldapplugin JSON kaddressbook_importexportldapplugin.json SOURCES
${kaddressbook_importexport_ldap_SRCS} INSTALL_NAMESPACE kaddressbook/importexportplugin)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbook_importexportldapplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbook_importexportldapplugin
KPim::AddressbookImportExport
......
......@@ -6,6 +6,9 @@ set(kaddressbook_importexport_ldif_SRCS
kcoreaddons_add_plugin(kaddressbook_importexportldifplugin JSON kaddressbook_importexportldifplugin.json SOURCES
${kaddressbook_importexport_ldif_SRCS} INSTALL_NAMESPACE kaddressbook/importexportplugin)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbook_importexportldifplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbook_importexportldifplugin
KPim::AddressbookImportExport
......
......@@ -8,6 +8,9 @@ set(kaddressbook_importexport_vcard_SRCS
kcoreaddons_add_plugin(kaddressbook_importexportvcardplugin JSON kaddressbook_importexportvcardplugin.json SOURCES
${kaddressbook_importexport_vcard_SRCS} INSTALL_NAMESPACE kaddressbook/importexportplugin)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbook_importexportvcardplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbook_importexportvcardplugin
KPim::AddressbookImportExport
......
......@@ -13,6 +13,9 @@ set(kaddressbook_importexport_windowscontact_SRCS
kcoreaddons_add_plugin(kaddressbook_importexportwindowscontactplugin JSON kaddressbook_importexportwindowscontactplugin.json SOURCES
${kaddressbook_importexport_windowscontact_SRCS} INSTALL_NAMESPACE kaddressbook/importexportplugin)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbook_importexportwindowscontactplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbook_importexportwindowscontactplugin
KPim::AddressbookImportExport
......
......@@ -22,6 +22,9 @@ ecm_qt_declare_logging_category(kaddressbook_checkgravatarplugin_SRCS HEADER kad
kcoreaddons_add_plugin(kaddressbook_checkgravatarplugin JSON kaddressbook_checkgravatarplugin.json SOURCES
${kaddressbook_checkgravatarplugin_SRCS} INSTALL_NAMESPACE kaddressbook/mainview)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbook_checkgravatarplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbook_checkgravatarplugin
KF5::PimCommon KF5::Completion KF5::PimCommonAkonadi KF5::XmlGui KF5::Gravatar KF5::I18n KF5::Contacts
......
......@@ -6,6 +6,9 @@ set(kaddressbook_mergecontactsplugin_SRCS
kcoreaddons_add_plugin(kaddressbook_mergecontactsplugin JSON kaddressbook_mergecontactsplugin.json SOURCES
${kaddressbook_mergecontactsplugin_SRCS} INSTALL_NAMESPACE kaddressbook/mainview)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbook_mergecontactsplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbook_mergecontactsplugin
KF5::PimCommon KF5::Completion KF5::PimCommonAkonadi KF5::XmlGui kaddressbookmergelibprivate KF5::I18n
......
......@@ -27,6 +27,9 @@ ecm_qt_declare_logging_category(kaddressbookmergelibprivate_SRCS HEADER kaddress
add_library(kaddressbookmergelibprivate ${kaddressbookmergelibprivate_SRCS})
generate_export_header(kaddressbookmergelibprivate BASE_NAME kaddressbookmergelib)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbookmergelibprivate PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbookmergelibprivate
......
......@@ -23,7 +23,7 @@
using namespace KABMergeContacts;
namespace {
static const char myConfigGroupName[] = "SearchAndMergeContactDuplicateContactDialog";
static const char mySearchAndMergeContactDuplicateContactDialogGroupName[] = "SearchAndMergeContactDuplicateContactDialog";
}
SearchAndMergeContactDuplicateContactDialog::SearchAndMergeContactDuplicateContactDialog(QWidget *parent)
: QDialog(parent)
......@@ -93,7 +93,7 @@ void SearchAndMergeContactDuplicateContactDialog::searchPotentialDuplicateContac
void SearchAndMergeContactDuplicateContactDialog::readConfig()
{
KConfigGroup grp(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup grp(KSharedConfig::openConfig(), mySearchAndMergeContactDuplicateContactDialogGroupName);
const QSize size = grp.readEntry("Size", QSize(300, 200));
if (size.isValid()) {
resize(size);
......@@ -102,7 +102,7 @@ void SearchAndMergeContactDuplicateContactDialog::readConfig()
void SearchAndMergeContactDuplicateContactDialog::writeConfig()
{
KConfigGroup grp(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup grp(KSharedConfig::openConfig(), mySearchAndMergeContactDuplicateContactDialogGroupName);
grp.writeEntry("Size", size());
grp.sync();
}
......
......@@ -5,6 +5,9 @@ set(kaddressbook_searchduplicatesplugin_SRCS
kcoreaddons_add_plugin(kaddressbook_searchduplicatesplugin JSON kaddressbook_searchduplicatesplugin.json SOURCES
${kaddressbook_searchduplicatesplugin_SRCS} INSTALL_NAMESPACE kaddressbook/mainview)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbook_searchduplicatesplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbook_searchduplicatesplugin
KF5::PimCommon KF5::Completion KF5::PimCommonAkonadi KF5::XmlGui kaddressbookmergelibprivate KF5::I18n
......
......@@ -18,6 +18,9 @@ ecm_qt_declare_logging_category(kaddressbook_sendmailplugin_SRCS HEADER kaddress
kcoreaddons_add_plugin(kaddressbook_sendmailplugin JSON kaddressbook_sendmailplugin.json SOURCES
${kaddressbook_sendmailplugin_SRCS} INSTALL_NAMESPACE kaddressbook/mainview)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbook_sendmailplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbook_sendmailplugin
KF5::PimCommon KF5::Completion KF5::PimCommonAkonadi KF5::XmlGui KF5::I18n
......
......@@ -19,6 +19,9 @@ kcoreaddons_add_plugin(kaddressbook_sendvcardsplugin JSON kaddressbook_sendvcard
${kaddressbook_sendvcardsplugin_SRCS} INSTALL_NAMESPACE kaddressbook/mainview)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kaddressbook_sendvcardsplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kaddressbook_sendvcardsplugin
KF5::PimCommon KF5::Completion KF5::PimCommonAkonadi KF5::XmlGui KF5::MimeTreeParser KF5::I18n
)
......
......@@ -16,6 +16,9 @@ set(kmailmarkdownlib_SRCS
add_library(kmailmarkdown ${kmailmarkdownlib_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmailmarkdown PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(kmailmarkdown BASE_NAME libkmailmarkdown)
target_link_libraries(kmailmarkdown
KF5::MessageComposer
......
......@@ -8,6 +8,9 @@ ecm_qt_declare_logging_category(kmail_markdownplugin_SRCS HEADER markdownplugin_
kcoreaddons_add_plugin(kmail_markdownplugin JSON kmail_markdownplugin.json SOURCES
${kmail_markdownplugin_SRCS} INSTALL_NAMESPACE kmail/plugineditorconverttext)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_markdownplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_markdownplugin PRIVATE
KF5::I18n KF5::XmlGui
......
......@@ -7,6 +7,9 @@ set(kmail_externalcomposereditorplugin_SRCS
kcoreaddons_add_plugin(kmail_externalcomposereditorplugin JSON kmail_externalcomposereditorplugin.json SOURCES
${kmail_externalcomposereditorplugin_SRCS} INSTALL_NAMESPACE kmail/plugineditorinit)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_externalcomposereditorplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_externalcomposereditorplugin
KF5::MessageComposer KF5::XmlGui KF5::I18n KF5::KIOWidgets
......
......@@ -9,6 +9,9 @@ kcoreaddons_add_plugin(kmail_autocorrectioneditorplugin JSON kmail_autocorrectio
target_link_libraries(kmail_autocorrectioneditorplugin
KF5::MessageComposer KF5::XmlGui KF5::I18n
)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_autocorrectioneditorplugin PROPERTIES UNITY_BUILD ON)
endif()
if(BUILD_TESTING)
add_subdirectory(autotests)
......
......@@ -11,6 +11,9 @@ ecm_qt_declare_logging_category(kmail_changecaseeditorplugin_SRCS HEADER changec
kcoreaddons_add_plugin(kmail_changecaseeditorplugin JSON kmail_changecaseeditorplugin.json SOURCES
${kmail_changecaseeditorplugin_SRCS} INSTALL_NAMESPACE kmail/plugineditor)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_changecaseeditorplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_changecaseeditorplugin
KF5::MessageComposer KF5::XmlGui KF5::I18n
......
......@@ -11,6 +11,9 @@ kcoreaddons_add_plugin(kmail_insertemaileditorplugin JSON kmail_insertemailedito
target_link_libraries(kmail_insertemaileditorplugin
KF5::MessageComposer KF5::XmlGui KF5::I18n KF5::AkonadiContact
)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_insertemaileditorplugin PROPERTIES UNITY_BUILD ON)
endif()
if(BUILD_TESTING)
add_subdirectory(autotests)
......
......@@ -7,6 +7,9 @@ set(shorturlpluginprivate_SRCS
add_library(shorturlpluginprivate ${shorturlpluginprivate_SRCS})
generate_export_header(shorturlpluginprivate BASE_NAME shorturl)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(shorturlpluginprivate PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(shorturlpluginprivate
PRIVATE
......
......@@ -5,6 +5,9 @@ set(kmail_insertspecialcharactereditorplugin_SRCS
kcoreaddons_add_plugin(kmail_insertspecialcharactereditorplugin JSON kmail_insertspecialcharactereditorplugin.json SOURCES
${kmail_insertspecialcharactereditorplugin_SRCS} INSTALL_NAMESPACE kmail/plugineditor)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_insertspecialcharactereditorplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_insertspecialcharactereditorplugin
KF5::MessageComposer KF5::XmlGui KF5::I18n
......
......@@ -5,6 +5,9 @@ set(kmail_nonbreakingspaceeditorplugin_SRCS
kcoreaddons_add_plugin(kmail_nonbreakingspaceeditorplugin JSON kmail_nonbreakingspaceeditorplugin.json SOURCES
${kmail_nonbreakingspaceeditorplugin_SRCS} INSTALL_NAMESPACE kmail/plugineditor)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_nonbreakingspaceeditorplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_nonbreakingspaceeditorplugin
KF5::MessageComposer KF5::XmlGui KF5::I18n
......
......@@ -10,6 +10,10 @@ set(kmail_quicktextplugin_private_SRCS
add_library(kmailquicktextpluginprivate ${kmail_quicktextplugin_private_SRCS})
generate_export_header(kmailquicktextpluginprivate BASE_NAME quicktext)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmailquicktextpluginprivate PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmailquicktextpluginprivate
PRIVATE
......@@ -39,6 +43,9 @@ ecm_qt_declare_logging_category(kmail_quicktextplugin_SRCS HEADER quicktextplugi
kcoreaddons_add_plugin(kmail_quicktextplugin JSON kmail_quicktextplugin.json SOURCES
${kmail_quicktextplugin_SRCS} INSTALL_NAMESPACE kmail/plugineditor)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_quicktextplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_quicktextplugin
KF5::MessageComposer KF5::XmlGui KF5::I18n kmailquicktextpluginprivate KF5::MailCommon
......
......@@ -12,6 +12,9 @@ ecm_qt_declare_logging_category(kmail_sharetexteditorplugin_SRCS HEADER sharetex
kcoreaddons_add_plugin(kmail_sharetexteditorplugin JSON kmail_sharetexteditorplugin.json SOURCES
${kmail_sharetexteditorplugin_SRCS} INSTALL_NAMESPACE kmail/plugineditor)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_sharetexteditorplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_sharetexteditorplugin
KF5::MessageComposer KF5::XmlGui KF5::I18n
......
......@@ -14,6 +14,9 @@ ecm_qt_declare_logging_category(kmail_zoomtexteditorplugin_SRCS HEADER zoomtexte
kcoreaddons_add_plugin(kmail_zoomtexteditorplugin JSON kmail_zoomtexteditorplugin.json SOURCES
${kmail_zoomtexteditorplugin_SRCS} INSTALL_NAMESPACE kmail/plugineditor)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_zoomtexteditorplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_zoomtexteditorplugin
......
......@@ -17,6 +17,9 @@ ecm_qt_declare_logging_category(kmail_automaticaddcontactseditorplugin_SRCS HEAD
kcoreaddons_add_plugin(kmail_automaticaddcontactseditorplugin JSON kmail_automaticaddcontactsplugin.json SOURCES
${kmail_automaticaddcontactseditorplugin_SRCS} INSTALL_NAMESPACE kmail/plugincheckbeforesend)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_automaticaddcontactseditorplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_automaticaddcontactseditorplugin
KF5::MessageComposer KF5::I18n KF5::PimCommon KF5::AkonadiContact KF5::AkonadiCore
......
......@@ -21,6 +21,9 @@ ecm_qt_declare_logging_category(kmail_checkbeforesendeditorplugin_SRCS HEADER ch
kcoreaddons_add_plugin(kmail_checkbeforesendeditorplugin JSON kmail_checkbeforesendplugin.json SOURCES
${kmail_checkbeforesendeditorplugin_SRCS} INSTALL_NAMESPACE kmail/plugincheckbeforesend)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_checkbeforesendeditorplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_checkbeforesendeditorplugin
KF5::MessageComposer KF5::I18n
......
......@@ -20,6 +20,9 @@ ecm_qt_declare_logging_category(kmail_confirmaddresseditorplugin_SRCS HEADER con
kcoreaddons_add_plugin(kmail_confirmaddresseditorplugin JSON kmail_confirmaddressplugin.json SOURCES
${kmail_confirmaddresseditorplugin_SRCS} INSTALL_NAMESPACE kmail/plugincheckbeforesend)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_confirmaddresseditorplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_confirmaddresseditorplugin
KF5::MessageComposer KF5::I18n KF5::PimCommon KF5::Libkdepim
......
......@@ -17,6 +17,10 @@ ecm_qt_declare_logging_category(kmailgrammalecte_SRCS HEADER libgrammalecte_debu
add_library(kmailgrammalecte ${kmailgrammalecte_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_confirmaddresseditorplugin PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(kmailgrammalecte BASE_NAME libkmailgrammalecte)
target_link_libraries(kmailgrammalecte
KF5::I18n
......
......@@ -13,6 +13,10 @@ ecm_qt_declare_logging_category(grammarcommon_SRCS HEADER grammarcommon_debug.h
add_library(grammarcommon ${grammarcommon_SRCS})
generate_export_header(grammarcommon BASE_NAME grammarcommon)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(grammarcommon PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(grammarcommon
KF5::I18n
KF5::MessageComposer
......
......@@ -15,6 +15,9 @@ ecm_qt_declare_logging_category(languagetoolplugin_SRCS HEADER languagetoolplugi
kcoreaddons_add_plugin(kmail_languagetoolplugin JSON kmail_languagetoolplugin.json SOURCES
${languagetoolplugin_SRCS} INSTALL_NAMESPACE kmail/plugineditorgrammar)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_languagetoolplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_languagetoolplugin
KF5::MessageComposer KF5::I18n KF5::PimCommon KF5::XmlGui kmaillanguagetool grammarcommon
......
......@@ -20,6 +20,10 @@ ecm_qt_declare_logging_category(kmaillanguagetool_SRCS HEADER liblanguagetool_de
add_library(kmaillanguagetool ${kmaillanguagetool_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmaillanguagetool PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(kmaillanguagetool BASE_NAME libkmaillanguagetool)
target_link_libraries(kmaillanguagetool
KF5::I18n
......
......@@ -12,7 +12,7 @@
#include <QColor>
#include <QRandomGenerator>
namespace {
static const char myConfigGroupName[] = "LanguageTool";
static const char myLanguageToolManagerGroupName[] = "LanguageTool";
}
LanguageToolManager::LanguageToolManager(QObject *parent)
: QObject(parent)
......@@ -84,7 +84,7 @@ void LanguageToolManager::setLanguageToolPath(const QString &path)
void LanguageToolManager::loadSettings()
{
KConfigGroup grp(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup grp(KSharedConfig::openConfig(), myLanguageToolManagerGroupName);
mLanguageToolPath = grp.readEntry(QStringLiteral("languagetoolpath"), QStringLiteral("https://languagetool.org/api/v2"));
mLanguage = grp.readEntry(QStringLiteral("language"), QStringLiteral("en"));
mUseLocalInstance = grp.readEntry(QStringLiteral("useLocalInstance"), false);
......@@ -93,7 +93,7 @@ void LanguageToolManager::loadSettings()
void LanguageToolManager::saveSettings()
{
KConfigGroup grp(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup grp(KSharedConfig::openConfig(), myLanguageToolManagerGroupName);
grp.writeEntry(QStringLiteral("languagetoolpath"), mLanguageToolPath);
grp.writeEntry(QStringLiteral("language"), mLanguage);
grp.writeEntry(QStringLiteral("useLocalInstance"), mUseLocalInstance);
......
......@@ -10,6 +10,9 @@ kcoreaddons_add_plugin(kmail_antispamplugin JSON kmail_antispamplugin.json SOURC
target_link_libraries(kmail_antispamplugin
KF5::PimCommonAkonadi KF5::Completion KF5::MailCommon KF5::XmlGui KF5::I18n KF5::GuiAddons
)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_antispamplugin PROPERTIES UNITY_BUILD ON)
endif()
if(BUILD_TESTING)
......
......@@ -11,6 +11,10 @@ kcoreaddons_add_plugin(kmail_antivirusplugin JSON kmail_antivirusplugin.json SOU
target_link_libraries(kmail_antivirusplugin
KF5::PimCommonAkonadi KF5::Completion KF5::MailCommon KF5::AkonadiWidgets KF5::XmlGui KF5::Libkdepim KF5::I18n KF5::GuiAddons
)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_antivirusplugin PROPERTIES UNITY_BUILD ON)
endif()
if(BUILD_TESTING)
add_subdirectory(autotests)
endif()
......@@ -13,6 +13,9 @@ ecm_qt_declare_logging_category(kmail_expertplugin_SRCS
kcoreaddons_add_plugin(kmail_expertplugin JSON kmail_expertplugin.json SOURCES
${kmail_expertplugin_SRCS} INSTALL_NAMESPACE kmail/mainview)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_expertplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kmail_expertplugin
KF5::PimCommon KF5::PimCommonAkonadi KF5::XmlGui KF5::Libkdepim KF5::I18n
......
......@@ -9,6 +9,10 @@ kcoreaddons_add_plugin(kmail_logactivitiesplugin JSON kmail_logactivitiesplugin.
target_link_libraries(kmail_logactivitiesplugin
KF5::PimCommon KF5::PimCommonAkonadi KF5::XmlGui KF5::Libkdepim KF5::I18n
)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kmail_logactivitiesplugin PROPERTIES UNITY_BUILD ON)
endif()
if(BUILD_TESTING)
add_subdirectory(autotests)
endif()
......@@ -14,9 +14,11 @@ ecm_qt_declare_logging_category(mailtransport_sendplugin_SRCS HEADER sendmailplu
ki18n_wrap_ui(mailtransport_sendplugin_SRCS
sendmailsettings.ui
)
kcoreaddons_add_plugin(mailtransport_sendplugin JSON sendmailtransport.json SOURCES
${mailtransport_sendplugin_SRCS} INSTALL_NAMESPACE mailtransport)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(mailtransport_sendplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(mailtransport_sendplugin
KF5::MailTransport
......
......@@ -5,6 +5,9 @@ set(pimcommon_translatorplugin_SRCS
kcoreaddons_add_plugin(pimcommon_translatorplugin JSON pimcommon_translatorplugin.json SOURCES
${pimcommon_translatorplugin_SRCS} INSTALL_NAMESPACE pimcommon/customtools)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(pimcommon_translatorplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(pimcommon_translatorplugin
KF5::PimCommon
......
......@@ -19,7 +19,9 @@ qt5_add_dbus_interfaces(messageviewer_bodypartformatter_text_calendar_PART_SRCS
ki18n_wrap_ui(messageviewer_bodypartformatter_text_calendar_PART_SRCS attendeeselector.ui)
add_library(messageviewer_bodypartformatter_text_calendar MODULE ${messageviewer_bodypartformatter_text_calendar_PART_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(messageviewer_bodypartformatter_text_calendar PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(messageviewer_bodypartformatter_text_calendar
KF5::KontactInterface
......
......@@ -23,6 +23,9 @@ ecm_qt_declare_logging_category(messageviewer_bodypartformatter_application_gnup
add_library(messageviewer_bodypartformatter_application_gnupgwks MODULE ${messageviewer_bodypartformatter_application_gnupgwks_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(messageviewer_bodypartformatter_application_gnupgwks PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(messageviewer_bodypartformatter_application_gnupgwks
Qt5::Core
......
......@@ -3,6 +3,9 @@ add_definitions(-DTRANSLATION_DOMAIN=\"messageviewer_text_xdiff_plugin\")
set(messageviewer_bodypartformatter_text_highlighter_PART_SRCS texthighlighterplugin.cpp highlighter.cpp)
add_library(messageviewer_bodypartformatter_text_highlighter MODULE ${messageviewer_bodypartformatter_text_highlighter_PART_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(messageviewer_bodypartformatter_text_highlighter PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(messageviewer_bodypartformatter_text_highlighter
Qt5::Core
......
......@@ -14,6 +14,10 @@ ecm_qt_declare_logging_category(itinerary_plugin_srcs HEADER itinerary_debug.h I
add_library(messageviewer_bodypartformatter_semantic MODULE ${itinerary_plugin_srcs})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(messageviewer_bodypartformatter_semantic PROPERTIES UNITY_BUILD ON)
endif()
target_compile_definitions(messageviewer_bodypartformatter_semantic PRIVATE -DTRANSLATION_DOMAIN=\"messageviewer_semantic_plugin\")
target_link_libraries(messageviewer_bodypartformatter_semantic
KF5::KontactInterface
......
......@@ -12,6 +12,9 @@ add_definitions(-DTRANSLATION_DOMAIN=\"messageviewer_text_markdown_plugin\")
set(messageviewer_bodypartformatter_text_markdown_PART_SRCS textmarkdownplugin.cpp ${mardown_engine_SRCS} markdownabstract.cpp)
add_library(messageviewer_bodypartformatter_text_markdown MODULE ${messageviewer_bodypartformatter_text_markdown_PART_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(messageviewer_bodypartformatter_text_markdown PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(messageviewer_bodypartformatter_text_markdown
Qt5::Core
......
......@@ -30,6 +30,10 @@ ecm_qt_declare_logging_category(dkimverifyconfigure_SRCS HEADER libdkimverifycon
)
add_library(dkimverifyconfigure ${dkimverifyconfigure_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(dkimverifyconfigure PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(dkimverifyconfigure BASE_NAME libdkimverifyconfigure)
target_link_libraries(dkimverifyconfigure
KF5::I18n
......
......@@ -11,7 +11,7 @@
#include <QHBoxLayout>
namespace {
static const char myConfigGroupName[] = "DKIMKeyRecordWidget";
static const char myDKIMKeyRecordWidgetGroupName[] = "DKIMKeyRecordWidget";
}
DKIMKeyRecordWidget::DKIMKeyRecordWidget(QWidget *parent)
......@@ -33,13 +33,13 @@ DKIMKeyRecordWidget::~DKIMKeyRecordWidget()
void DKIMKeyRecordWidget::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
KConfigGroup group(KSharedConfig::openConfig(), myDKIMKeyRecordWidgetGroupName);
mManagerKeyWidget->restoreHeaders(group.readEntry("Header", QByteArray()));
}