Commit 476f584d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Create akonadi lib

parent 817852e5
cmake_minimum_required(VERSION 3.0)
set(PIM_VERSION "5.4.81")
set(PIM_VERSION "5.4.82")
project(MailImporter VERSION ${PIM_VERSION})
......
set(libmailimporter_filters_SRCS
filters/filteroe.cpp
filters/filterpmail.cpp
filters/filterplain.cpp
filters/filtermbox.cpp
filters/filterevolution.cpp
filters/filtermailapp.cpp
filters/filterevolution_v2.cpp
filters/filterevolution_v3.cpp
filters/filteropera.cpp
filters/filterthunderbird.cpp
filters/filterkmail_maildir.cpp
filters/filtersylpheed.cpp
filters/filterclawsmail.cpp
filters/filterthebat.cpp
filters/filterlnotes.cpp
filters/filterkmailarchive.cpp
filters/filtermailmangzip.cpp
filters/filtericedove.cpp
filters/filterbalsa.cpp
)
set(libmailimporter_SRCS
messagestatus.cpp
importmailswidget.cpp
filterinfogui.cpp
filterinfo.cpp
filters.cpp
filterimporterbase.cpp
othermailerutil.cpp
selectthunderbirdprofilewidget.cpp
)
set(libmailimporter_akonadi_SRCS
akonadi/filterimporterakonadi.cpp
)
ki18n_wrap_ui(libmailimporter_SRCS ui/importmailswidget.ui ui/selectthunderbirdprofilewidget.ui)
ecm_qt_declare_logging_category(libmailimporter_SRCS HEADER mailimporter_debug.h IDENTIFIER MAILIMPORTER_LOG CATEGORY_NAME org.kde.pim.mailimporter)
add_library(KF5MailImporter
${libmailimporter_SRCS}
${libmailimporter_filters_SRCS}
${libmailimporter_akonadi_SRCS}
)
generate_export_header( KF5MailImporter BASE_NAME mailimporter)
add_library(KF5::MailImporter ALIAS KF5MailImporter)
target_include_directories(KF5MailImporter INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MailImporter/;${KDE_INSTALL_INCLUDEDIR_KF5}/mailimporter>")
target_include_directories(KF5MailImporter PUBLIC "$<BUILD_INTERFACE:${MailImporter_SOURCE_DIR}/src;${MailImporter_BINARY_DIR}/src;>")
target_link_libraries(KF5MailImporter
PUBLIC
KF5::Mime
PRIVATE
KF5::AkonadiCore
KF5::AkonadiMime
KF5::Libkdepim
KF5::Archive
KF5::I18n
KF5::ConfigCore
Qt5::Xml
Qt5::Widgets
)
set_target_properties(KF5MailImporter PROPERTIES
VERSION ${MAILIMPORTER_VERSION_STRING}
SOVERSION ${MAILIMPORTER_SOVERSION}
EXPORT_NAME MailImporter
)
install(TARGETS
KF5MailImporter
EXPORT KF5MailImporterTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
)
ecm_generate_headers(MailImporter_CamelCase_HEADERS
HEADER_NAMES
FilterImporterBase
FilterInfoGui
OtherMailerUtil
ImportMailsWidget
MailImporter_Utils
Filters
FilterInfo
MessageStatus
REQUIRED_HEADERS MailImporter_HEADERS
PREFIX MailImporter
)
ecm_generate_headers(MailImporter_FiltersCamelCase_HEADERS
HEADER_NAMES
FilterClawsMail
FilterBalsa
FilterSylpheed
FilterTheBat
FilterEvolution
FilterThunderbird
FilterEvolution_v2
FilterEvolution_v3
FilterMailApp
FilterMailmanGzip
FilterPlain
FilterPMail
FilterMBox
FilterOpera
FilterLNotes
FilterOE
FilterKMail_maildir
FilterKMailArchive
FilterIcedove
REQUIRED_HEADERS MailImporter_Filters_HEADERS
PREFIX MailImporter
RELATIVE filters
)
ecm_generate_headers(MailImporter_AkonadiCamelCase_HEADERS
HEADER_NAMES
FilterImporterAkonadi
REQUIRED_HEADERS MailImporter_Akonadi_HEADERS
PREFIX MailImporter
RELATIVE akonadi
)
ecm_generate_pri_file(BASE_NAME MailImporter
LIB_NAME KF5MailImpoter
DEPS "Mime" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MailImporter
)
install(FILES
${MailImporter_CamelCase_HEADERS}
${MailImporter_FiltersCamelCase_HEADERS}
${MailImporter_AkonadiCamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MailImporter
COMPONENT Devel
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailimporter_export.h
${MailImporter_HEADERS}
${MailImporter_Filters_HEADERS}
${MailImporter_Akonadi_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/mailimporter
COMPONENT Devel
)
install(FILES
${PRI_FILENAME}
DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
add_subdirectory(mailimporter)
add_subdirectory(mailimporterakonadi)
set(libmailimporter_filters_SRCS
filters/filteroe.cpp
filters/filterpmail.cpp
filters/filterplain.cpp
filters/filtermbox.cpp
filters/filterevolution.cpp
filters/filtermailapp.cpp
filters/filterevolution_v2.cpp
filters/filterevolution_v3.cpp
filters/filteropera.cpp
filters/filterthunderbird.cpp
filters/filterkmail_maildir.cpp
filters/filtersylpheed.cpp
filters/filterclawsmail.cpp
filters/filterthebat.cpp
filters/filterlnotes.cpp
filters/filterkmailarchive.cpp
filters/filtermailmangzip.cpp
filters/filtericedove.cpp
filters/filterbalsa.cpp
)
set(libmailimporter_SRCS
messagestatus.cpp
importmailswidget.cpp
filterinfogui.cpp
filterinfo.cpp
filters.cpp
filterimporterbase.cpp
othermailerutil.cpp
selectthunderbirdprofilewidget.cpp
)
ki18n_wrap_ui(libmailimporter_SRCS ui/importmailswidget.ui ui/selectthunderbirdprofilewidget.ui)
ecm_qt_declare_logging_category(libmailimporter_SRCS HEADER mailimporter_debug.h IDENTIFIER MAILIMPORTER_LOG CATEGORY_NAME org.kde.pim.mailimporter)
add_library(KF5MailImporter
${libmailimporter_SRCS}
${libmailimporter_filters_SRCS}
)
generate_export_header( KF5MailImporter BASE_NAME mailimporter)
add_library(KF5::MailImporter ALIAS KF5MailImporter)
target_include_directories(KF5MailImporter INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MailImporter/;${KDE_INSTALL_INCLUDEDIR_KF5}/mailimporter>")
target_include_directories(KF5MailImporter PUBLIC "$<BUILD_INTERFACE:${MailImporter_SOURCE_DIR}/src;${MailImporter_BINARY_DIR}/src;>")
target_link_libraries(KF5MailImporter
PUBLIC
KF5::Mime
PRIVATE
KF5::Libkdepim
KF5::Archive
KF5::I18n
KF5::ConfigCore
Qt5::Xml
Qt5::Widgets
)
set_target_properties(KF5MailImporter PROPERTIES
VERSION ${MAILIMPORTER_VERSION_STRING}
SOVERSION ${MAILIMPORTER_SOVERSION}
EXPORT_NAME MailImporter
)
install(TARGETS
KF5MailImporter
EXPORT KF5MailImporterTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
)
ecm_generate_headers(MailImporter_CamelCase_HEADERS
HEADER_NAMES
FilterImporterBase
FilterInfoGui
OtherMailerUtil
ImportMailsWidget
MailImporter_Utils
Filters
FilterInfo
MessageStatus
REQUIRED_HEADERS MailImporter_HEADERS
PREFIX MailImporter
)
ecm_generate_headers(MailImporter_FiltersCamelCase_HEADERS
HEADER_NAMES
FilterClawsMail
FilterBalsa
FilterSylpheed
FilterTheBat
FilterEvolution
FilterThunderbird
FilterEvolution_v2
FilterEvolution_v3
FilterMailApp
FilterMailmanGzip
FilterPlain
FilterPMail
FilterMBox
FilterOpera
FilterLNotes
FilterOE
FilterKMail_maildir
FilterKMailArchive
FilterIcedove
REQUIRED_HEADERS MailImporter_Filters_HEADERS
PREFIX MailImporter
RELATIVE filters
)
ecm_generate_pri_file(BASE_NAME MailImporter
LIB_NAME KF5MailImporter
DEPS "Mime" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MailImporter
)
install(FILES
${MailImporter_CamelCase_HEADERS}
${MailImporter_FiltersCamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MailImporter
COMPONENT Devel
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailimporter_export.h
${MailImporter_HEADERS}
${MailImporter_Filters_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/mailimporter
COMPONENT Devel
)
install(FILES
${PRI_FILENAME}
DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
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