CMakeLists.txt 2.19 KB
Newer Older
1
2
3
4
# SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
# SPDX-License-Identifier: BSD-3-Clause

add_definitions(-DTRANSLATION_DOMAIN=\"akonadi_mailmerge_agent\")
Laurent Montel's avatar
Laurent Montel committed
5
6
7
8
if(BUILD_TESTING)
    add_subdirectory(tests)
    add_subdirectory(autotests)
endif()
9
add_library(mailmergeagent STATIC)
Laurent Montel's avatar
Laurent Montel committed
10

11
12

ecm_qt_declare_logging_category(mailmergeagent HEADER mailmergeagent_debug.h IDENTIFIER MAILMERGEAGENT_LOG CATEGORY_NAME org.kde.pim.mailmergeagent
Laurent Montel's avatar
Laurent Montel committed
13
14
15
16
17
18
        DESCRIPTION "kmail (mailmergeagent)"
        OLD_CATEGORY_NAMES log_mailmergeagent
        EXPORT KMAIL
    )


19
target_sources(mailmergeagent PRIVATE
Laurent Montel's avatar
Laurent Montel committed
20
    mailmergeagent.cpp
Laurent Montel's avatar
Laurent Montel committed
21
    mailmergemanager.cpp
22
    mailmergeconfiguredialog.cpp
23
    mailmergeconfigurewidget.cpp
Laurent Montel's avatar
Laurent Montel committed
24
25
    )

26
qt_add_dbus_adaptor(mailmergeagent_SRCS org.freedesktop.Akonadi.MailMergeAgent.xml mailmergeagent.h MailMergeAgent)
Laurent Montel's avatar
Laurent Montel committed
27

28
29
30
target_sources(mailmergeagent PRIVATE ${mailmergeagent_SRCS})

kconfig_add_kcfg_files(mailmergeagent mailmergeagentsettings.kcfgc)
Laurent Montel's avatar
Laurent Montel committed
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
#    set_target_properties(sendlateragent PROPERTIES UNITY_BUILD ON)
#endif()

target_link_libraries(mailmergeagent
    KF5::AkonadiCore
    KF5::AkonadiMime
    KF5::MailTransportAkonadi
    KF5::Mime
    KF5::MessageComposer
    KF5::MessageCore
    KF5::PimCommon
    KF5::DBusAddons
    KF5::WindowSystem
    KF5::XmlGui
    KF5::I18n
47
    KF5::Notifications
48
    KF5::AkonadiAgentBase
Laurent Montel's avatar
Laurent Montel committed
49
50
    )

51
add_executable(akonadi_mailmerge_agent)
Laurent Montel's avatar
Laurent Montel committed
52
53
54
55
56
target_link_libraries(akonadi_mailmerge_agent
    mailmergeagent
    KF5::AkonadiAgentBase
    )

57
58


Laurent Montel's avatar
Laurent Montel committed
59
60
61
62
63
64
65
66
if( APPLE )
    set_target_properties(akonadi_mailmerge_agent PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${kmail_SOURCE_DIR}/agents/Info.plist.template)
    set_target_properties(akonadi_mailmerge_agent PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi Mail Merge")
endif ()

install(TARGETS akonadi_mailmerge_agent ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )

install(FILES mailmergeagent.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents")
Laurent Montel's avatar
Laurent Montel committed
67
install(FILES akonadi_mailmerge_agent.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} )
Laurent Montel's avatar
Laurent Montel committed
68

69
70
71
#kcoreaddons_add_plugin(mailmergeagentconfig
#    JSON mailmergeagentconfig.json
#    SOURCES ${mailmergeagentconfig_SRCS}
Laurent Montel's avatar
Laurent Montel committed
72
#    INSTALL_NAMESPACE akonadi/config
73
#    )