Commit 45d067f4 authored by Laurent Montel's avatar Laurent Montel 😁

create minimum lib

parent d0510e36
org.kde.pim.importwizard importwizard (importwizard)
org.kde.pim.importwizard.lib importwizard (libimportwizard)
org.kde.pim.importwizard.balsaplugin importwizard (balsa plugin)
org.kde.pim.importwizard.evolutionplugin importwizard (evolution v3 plugin)
org.kde.pim.importwizard.gearyplugin importwizard (geary plugin)
......
......@@ -4,18 +4,6 @@ configure_file(importwizard-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/importwi
add_subdirectory(icons)
add_subdirectory(kconf_update)
set(libimportwizard_SRCS
importwizard.cpp
importwizardkernel.cpp
importmailpluginmanager.cpp
importwizarddisplayinfo.cpp
)
set(libimportwizard_manual_SRCS
manual/manualimportmailpage.cpp
manual/importwizardfilterinfogui.cpp
manual/manualselectfilterpage.cpp
)
set(libimportwizard_abstract_SRCS
abstract/abstractimporter.cpp
......@@ -26,8 +14,52 @@ set(libimportwizard_abstract_SRCS
abstract/abstractdisplayinfo.cpp
)
ecm_qt_declare_logging_category(libimportwizard_abstract_SRCS HEADER libimportwizard_debug.h IDENTIFIER LIBIMPORTWIZARD_LOG CATEGORY_NAME org.kde.pim.importwizard.lib)
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-kontact-import-wizard.png")
ecm_add_app_icon(importwizard_SRCS ICONS ${ICONS_SRCS})
add_library(libimportwizard ${libimportwizard_abstract_SRCS})
generate_export_header(libimportwizard BASE_NAME libimportwizard)
target_link_libraries(libimportwizard
PRIVATE
KF5::AkonadiCore
KF5::MailTransport
KF5::XmlGui
KF5::MailImporterAkonadi
KF5::PimCommon
KF5::MailCommon
KF5::Libkdepim
KF5::MessageViewer
KF5::Completion
KF5::I18n
KF5::CoreAddons
)
set_target_properties(libimportwizard
PROPERTIES OUTPUT_NAME importwizard VERSION ${KDEPIM_LIB_VERSION} SOVERSION ${KDEPIM_LIB_SOVERSION}
)
set(importwizard_SRCS
main.cpp
importwizard.cpp
importwizardkernel.cpp
importmailpluginmanager.cpp
importwizarddisplayinfo.cpp
)
set(importwizard_manual_SRCS
manual/manualimportmailpage.cpp
manual/importwizardfilterinfogui.cpp
manual/manualselectfilterpage.cpp
)
set(libimportwizard_autodetect_SRCS
set(importwizard_autodetect_SRCS
autodetect/widgets/selectprogramlistwidget.cpp
autodetect/importwizardutil.cpp
autodetect/selectprogrampage.cpp
......@@ -42,7 +74,7 @@ set(libimportwizard_autodetect_SRCS
)
ki18n_wrap_ui(libimportwizard_SRCS
ki18n_wrap_ui(importwizard_SRCS
ui/autodetect/selectprogrampage.ui
ui/autodetect/importaddressbookpage.ui
ui/autodetect/importfilterpage.ui
......@@ -55,18 +87,17 @@ ki18n_wrap_ui(libimportwizard_SRCS
ui/manual/manualselectfilterpage.ui
)
ecm_qt_declare_logging_category(libimportwizard_SRCS HEADER importwizard_debug.h IDENTIFIER IMPORTWIZARD_LOG CATEGORY_NAME org.kde.pim.importwizard)
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-kontact-import-wizard.png")
ecm_add_app_icon(importwizard_SRCS ICONS ${ICONS_SRCS})
add_library(libimportwizard ${libimportwizard_autodetect_SRCS} ${libimportwizard_manual_SRCS} ${libimportwizard_SRCS} ${libimportwizard_abstract_SRCS})
ecm_qt_declare_logging_category(importwizard_SRCS HEADER importwizard_debug.h IDENTIFIER IMPORTWIZARD_LOG CATEGORY_NAME org.kde.pim.importwizard)
generate_export_header(libimportwizard BASE_NAME libimportwizard)
add_executable(importwizard
${importwizard_SRCS}
${importwizard_manual_SRCS}
${importwizard_autodetect_SRCS}
)
target_link_libraries(libimportwizard
PRIVATE
target_link_libraries(importwizard
libimportwizard
KF5::AkonadiCore
KF5::MailTransport
KF5::XmlGui
......@@ -78,29 +109,11 @@ target_link_libraries(libimportwizard
KF5::Completion
KF5::I18n
KF5::CoreAddons
)
set_target_properties(libimportwizard
PROPERTIES OUTPUT_NAME importwizard VERSION ${KDEPIM_LIB_VERSION} SOVERSION ${KDEPIM_LIB_SOVERSION}
)
set(importwizard_SRCS
main.cpp
)
add_executable(importwizard ${importwizard_SRCS})
target_link_libraries(importwizard
libimportwizard
KF5::I18n
KF5::Crash
KF5::CoreAddons
KF5::DBusAddons
Qt5::Widgets
KF5::ConfigCore
KF5::WidgetsAddons
KF5::MailCommon
)
install(TARGETS importwizard ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -24,7 +24,7 @@
#include <KContacts/Addressee>
#include <kcontacts/contactgroup.h>
#include <KLocalizedString>
#include "importwizard_debug.h"
#include "libimportwizard_debug.h"
#include <AkonadiCore/ItemCreateJob>
#include <AkonadiCore/Item>
#include <AkonadiWidgets/CollectionDialog>
......@@ -100,7 +100,7 @@ void AbstractAddressBook::createContact(const KContacts::Addressee &address)
void AbstractAddressBook::slotStoreDone(KJob *job)
{
if (job->error()) {
qCDebug(IMPORTWIZARD_LOG) << " job->errorString() : " << job->errorString();
qCDebug(LIBIMPORTWIZARD_LOG) << " job->errorString() : " << job->errorString();
addAddressBookImportError(i18n("Error during contact creation: %1", job->errorString()));
return;
}
......
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