CMakeLists.txt 3.41 KB
Newer Older
1
2
# SPDX-FileCopyrightText: 2014-2021 Laurent Montel <montel@kde.org>
# SPDX-License-Identifier: BSD-3-Clause
3
4
add_definitions(-DTRANSLATION_DOMAIN=\"akonadi_followupreminder_agent\")

5
6
add_library(followupreminderagent STATIC)

7
8


9

10
kconfig_add_kcfg_files(followupreminderagent
11
12
13
        followupreminderagentsettings.kcfgc
    )

14
ecm_qt_declare_logging_category(followupreminderagent HEADER followupreminderagent_debug.h IDENTIFIER FOLLOWUPREMINDERAGENT_LOG CATEGORY_NAME org.kde.pim.followupreminderagent
Laurent Montel's avatar
Laurent Montel committed
15
16
17
18
19
        DESCRIPTION "kmail (followupreminderagent)"
        OLD_CATEGORY_NAMES log_followupreminderagent
        EXPORT KMAIL
    )

20
qt_add_dbus_adaptor(followupreminderagent_SRCS org.freedesktop.Akonadi.FollowUpReminder.xml followupreminderagent.h FollowUpReminderAgent)
21

22
23
qt_add_dbus_interface(followupreminderagent_SRCS org.freedesktop.Notifications.xml notifications_interface)
qt_add_dbus_interface(followupreminderagent_SRCS org.freedesktop.DBus.Properties.xml dbusproperties)
24

25
26
27
28
29
30
31
32
33
34
35
target_sources(followupreminderagent PRIVATE
    followupremindermanager.cpp
    followupremindernoanswerdialog.cpp
    followupreminderinfowidget.cpp
    followupreminderinfo.cpp
    followupreminderutil.cpp
    jobs/followupreminderjob.cpp
    jobs/followupreminderfinishtaskjob.cpp
    jobs/followupremindershowmessagejob.cpp
     ${followupreminderagent_SRCS}
    )
36

Laurent Montel's avatar
Laurent Montel committed
37
pim_target_precompile_headers(followupreminderagent PUBLIC ../../kmail_pch.h)
38
39
40
#if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
#    set_target_properties(followupreminderagent PROPERTIES UNITY_BUILD ON)
#endif()
41

Laurent Montel's avatar
Laurent Montel committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
target_link_libraries(followupreminderagent
    KF5::AkonadiCore
    KF5::IdentityManagement
    KF5::AkonadiMime
    KF5::AkonadiAgentBase
    KF5::DBusAddons
    KF5::XmlGui
    KF5::KIOWidgets
    KF5::Notifications
    KF5::MailCommon
    KF5::I18n
    KF5::CalendarCore
)


########################### Agent executable ################################
add_executable(akonadi_followupreminder_agent followupreminderagent.cpp)

60
target_link_libraries(akonadi_followupreminder_agent
Laurent Montel's avatar
Laurent Montel committed
61
    followupreminderagent
62
63
64
65
66
67
    KF5::AkonadiCore
    KF5::AkonadiMime
    KF5::AkonadiAgentBase
    KF5::Mime
    KF5::CalendarCore
    KF5::DBusAddons
68
    Qt::Widgets
Daniel Vrátil's avatar
Daniel Vrátil committed
69
70
71
72
    KF5::Notifications
    KF5::I18n
    KF5::XmlGui
    KF5::Service
73
74
75
    )

if( APPLE )
76
    set_target_properties(akonadi_followupreminder_agent PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${kmail_SOURCE_DIR}/agents/Info.plist.template)
77
78
79
80
81
82
83
84
85
86
87
88
89
    set_target_properties(akonadi_followupreminder_agent PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.akonadi_followupreminder_agent")
    set_target_properties(akonadi_followupreminder_agent PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi Followup Reminder Agent")
endif ()

install(TARGETS akonadi_followupreminder_agent ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )

install(FILES followupreminder.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents")

if (BUILD_TESTING)
    add_subdirectory(autotests)
endif()

install(FILES akonadi_followupreminder_agent.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} )
Laurent Montel's avatar
Laurent Montel committed
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

########## Configuration ##############

set(followupreminderagentconfig_SRCS
    followupreminderinfoconfigwidget.cpp
)

kcoreaddons_add_plugin(followupreminderagentconfig
    JSON followupreminderagentconfig.json
    SOURCES ${followupreminderagentconfig_SRCS}
    INSTALL_NAMESPACE akonadi/config
)
target_link_libraries(followupreminderagentconfig
    followupreminderagent
    KF5::AkonadiCore
    KF5::XmlGui
    KF5::I18n
)