Commit 18240a9a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Improve unity support

parent cb681ce4
Pipeline #51342 failed with stage
in 29 minutes and 11 seconds
......@@ -32,7 +32,9 @@ ecm_qt_declare_logging_category(contactsresource_SRCS HEADER contacts_resources_
install( FILES contactsresource.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents" )
add_executable(akonadi_contacts_resource ${contactsresource_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akonadi_contacts_resource PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(akonadi_contacts_resource
KF5::AkonadiCore
KF5::AkonadiAgentBase
......
......@@ -51,6 +51,9 @@ qt5_add_dbus_adaptor(googleresource_SRCS
)
add_executable(akonadi_google_resource ${googleresource_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akonadi_google_resource PROPERTIES UNITY_BUILD ON)
endif()
if( APPLE )
set_target_properties(akonadi_google_resource PROPERTIES
......
......@@ -84,7 +84,7 @@ GoogleSettingsDialog::~GoogleSettingsDialog()
delete m_ui;
}
bool GoogleSettingsDialog::handleError(Job *job)
bool GoogleSettingsDialog::handleError(KGAPI2::Job *job)
{
if ((job->error() == KGAPI2::NoError) || (job->error() == KGAPI2::OK)) {
return true;
......@@ -140,7 +140,7 @@ void GoogleSettingsDialog::slotConfigure()
connect(authJob, &AuthJob::finished, this, &GoogleSettingsDialog::slotAuthJobFinished);
}
void GoogleSettingsDialog::slotAuthJobFinished(Job *job)
void GoogleSettingsDialog::slotAuthJobFinished(KGAPI2::Job *job)
{
auto authJob = qobject_cast<AuthJob *>(job);
m_account = authJob->account();
......@@ -211,7 +211,7 @@ void GoogleSettingsDialog::slotReloadCalendars()
}
auto fetchJob = new CalendarFetchJob(m_account, this);
connect(fetchJob, &CalendarFetchJob::finished, this, [this](Job *job) {
connect(fetchJob, &CalendarFetchJob::finished, this, [this](KGAPI2::Job *job) {
if (!handleError(job) || !m_account) {
m_ui->calendarsBox->setEnabled(false);
return;
......
......@@ -45,7 +45,9 @@ if( APPLE )
endif ()
target_link_libraries(akonadi_ical_resource KF5::AkonadiCore KF5::KIOCore KF5::CalendarCore KF5::AkonadiAgentBase akonadi-singlefileresource)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akonadi_ical_resource PROPERTIES UNITY_BUILD ON)
endif()
install(TARGETS akonadi_ical_resource ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
################################ Config plugin ###############################
......
......@@ -110,7 +110,9 @@ ki18n_wrap_ui(akonadi_imap_resource_SRCS setupserverview_desktop.ui)
add_executable(akonadi_imap_resource ${akonadi_imap_resource_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akonadi_imap_resource PROPERTIES UNITY_BUILD ON)
endif()
if( APPLE )
set_target_properties(akonadi_imap_resource PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template)
set_target_properties(akonadi_imap_resource PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.Akonadi.Imap")
......
......@@ -42,6 +42,9 @@ qt5_add_dbus_adaptor(mboxresource_SRCS
)
add_executable(akonadi_mbox_resource ${mboxresource_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akonadi_mbox_resource PROPERTIES UNITY_BUILD ON)
endif()
add_dependencies(akonadi_mbox_resource generated_headers)
if( APPLE )
......
......@@ -44,7 +44,9 @@ qt5_add_dbus_adaptor(mixedmaildirresource_SRCS
)
add_executable(akonadi_mixedmaildir_resource ${mixedmaildirresource_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akonadi_mixedmaildir_resource PROPERTIES UNITY_BUILD ON)
endif()
if( APPLE )
set_target_properties(akonadi_mixedmaildir_resource PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist.template)
set_target_properties(akonadi_mixedmaildir_resource PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.Akonadi.MixedMaildir")
......
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