CMakeLists.txt 5 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
project(kalarm)
2

3
add_definitions(-DQT_STRICT_ITERATORS)
4

5
6
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
Laurent Montel's avatar
Laurent Montel committed
7

Stephen Kelly's avatar
Stephen Kelly committed
8
set(CMAKE_AUTOMOC_RELAXED_MODE ON)
Laurent Montel's avatar
Laurent Montel committed
9

10

11

David Jarvie's avatar
David Jarvie committed
12

13
14
include_directories(
    ${CMAKE_CURRENT_BINARY_DIR}
Stephen Kelly's avatar
Stephen Kelly committed
15
16
    ${CMAKE_CURRENT_SOURCE_DIR}/
    ${CMAKE_CURRENT_SOURCE_DIR}/lib
17
18
19
    ${CMAKE_SOURCE_DIR}
    ${Boost_INCLUDE_DIR}
)
Laurent Montel's avatar
Laurent Montel committed
20

Stephen Kelly's avatar
Stephen Kelly committed
21
22
23
add_subdirectory(appicons)
add_subdirectory(pixmaps)
add_subdirectory(autostart)
24
add_subdirectory(kconf_update)
25
26

########### next target ###############
27
set(libkalarm_SRCS
Stephen Kelly's avatar
Stephen Kelly committed
28
29
30
31
    lib/buttongroup.cpp
    lib/checkbox.cpp
    lib/colourbutton.cpp
    lib/combobox.cpp
32
33
    lib/desktop.cpp
    lib/filedialog.cpp
34
    lib/groupbox.cpp
35
36
    lib/itembox.cpp
    lib/kalocale.cpp
Stephen Kelly's avatar
Stephen Kelly committed
37
    lib/label.cpp
Laurent Montel's avatar
Laurent Montel committed
38
    lib/messagebox.cpp
Stephen Kelly's avatar
Stephen Kelly committed
39
40
41
42
43
44
    lib/packedlayout.cpp
    lib/pushbutton.cpp
    lib/radiobutton.cpp
    lib/timeedit.cpp
    lib/timespinbox.cpp
    lib/timeperiod.cpp
45
    lib/timezonecombo.cpp
Stephen Kelly's avatar
Stephen Kelly committed
46
47
48
49
    lib/shellprocess.cpp
    lib/slider.cpp
    lib/spinbox.cpp
    lib/spinbox2.cpp
50
    lib/stackedwidgets.cpp
Stephen Kelly's avatar
Stephen Kelly committed
51
    lib/lineedit.cpp
52
    lib/synchtimer.cpp
53
)
54

David Jarvie's avatar
David Jarvie committed
55
set(kalarm_bin_SRCS ${libkalarm_SRCS}
Laurent Montel's avatar
Laurent Montel committed
56
    kalarm_debug.cpp
Stephen Kelly's avatar
Stephen Kelly committed
57
    birthdaydlg.cpp
58
    birthdaymodel.cpp
Stephen Kelly's avatar
Stephen Kelly committed
59
60
    main.cpp
    editdlg.cpp
61
    editdlgtypes.cpp
Stephen Kelly's avatar
Stephen Kelly committed
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
    soundpicker.cpp
    sounddlg.cpp
    alarmcalendar.cpp
    undo.cpp
    kalarmapp.cpp
    mainwindowbase.cpp
    mainwindow.cpp
    messagewin.cpp
    preferences.cpp
    prefdlg.cpp
    traywindow.cpp
    dbushandler.cpp
    recurrenceedit.cpp
    deferdlg.cpp
    functions.cpp
    fontcolour.cpp
    fontcolourbutton.cpp
79
    alarmtime.cpp
Stephen Kelly's avatar
Stephen Kelly committed
80
81
82
83
84
    alarmtimewidget.cpp
    specialactions.cpp
    reminder.cpp
    startdaytimer.cpp
    eventlistview.cpp
85
    alarmlistdelegate.cpp
Stephen Kelly's avatar
Stephen Kelly committed
86
87
88
89
90
91
92
93
94
    alarmlistview.cpp
    templatelistview.cpp
    kamail.cpp
    timeselector.cpp
    latecancel.cpp
    repetitionbutton.cpp
    emailidcombo.cpp
    find.cpp
    pickfileradio.cpp
95
96
97
    newalarmaction.cpp
    commandoptions.cpp
    resourceselector.cpp
Stephen Kelly's avatar
Stephen Kelly committed
98
99
100
    templatepickdlg.cpp
    templatedlg.cpp
    templatemenuaction.cpp
101
    wakedlg.cpp
David Jarvie's avatar
David Jarvie committed
102
)
103
set(kalarm_bin_SRCS ${kalarm_bin_SRCS}
Laurent Montel's avatar
Laurent Montel committed
104
    kalarmmigrateapplication.cpp
105
    akonadimodel.cpp
106
    akonadiresourcecreator.cpp
107
    collectionmodel.cpp
108
    collectionsearch.cpp
109
    itemlistmodel.cpp
110
    calendarmigrator.cpp
111
    eventid.cpp
112
   )
113

Laurent Montel's avatar
Laurent Montel committed
114
ki18n_wrap_ui(kalarm_bin_SRCS
115
116
117
    wakedlg.ui
)

Laurent Montel's avatar
Laurent Montel committed
118
qt5_add_dbus_adaptor(kalarm_bin_SRCS org.kde.kalarm.kalarm.xml dbushandler.h DBusHandler)
Laurent Montel's avatar
Laurent Montel committed
119
qt5_add_dbus_interfaces(kalarm_bin_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml)
120

David Jarvie's avatar
David Jarvie committed
121
kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/kalarmresource.kcfg org.kde.Akonadi.KAlarm.Settings)
Laurent Montel's avatar
Laurent Montel committed
122
qt5_add_dbus_interface(kalarm_bin_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.KAlarm.Settings.xml kalarmsettings KAlarmSettings)
123

David Jarvie's avatar
David Jarvie committed
124
kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/kalarmdirresource.kcfg org.kde.Akonadi.KAlarmDir.Settings)
Laurent Montel's avatar
Laurent Montel committed
125
qt5_add_dbus_interface(kalarm_bin_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.KAlarmDir.Settings.xml kalarmdirsettings KAlarmDirSettings)
126

Laurent Montel's avatar
Laurent Montel committed
127
qt5_add_dbus_interfaces(kalarm_bin_SRCS ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.Agent.Control.xml)
David Jarvie's avatar
David Jarvie committed
128
#qt5_add_dbus_adaptor(kalarm_bin_SRCS ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.Agent.Control.xml agentbase.h Akonadi::AgentBase controladaptor Akonadi__ControlAdaptor)
129

Laurent Montel's avatar
Laurent Montel committed
130
kconfig_add_kcfg_files(kalarm_bin_SRCS GENERATE_MOC kalarmconfig.kcfgc)
David Jarvie's avatar
David Jarvie committed
131

132
#if (UNIX)
Laurent Montel's avatar
Laurent Montel committed
133
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/appicons/*-apps-kalarm.png")
Laurent Montel's avatar
Laurent Montel committed
134
ecm_add_app_icon(kalarm_bin_SRCS ICONS ${ICONS_SRCS})
Laurent Montel's avatar
Laurent Montel committed
135
add_executable(kalarm_bin ${kalarm_bin_SRCS})
David Jarvie's avatar
David Jarvie committed
136
add_dependencies(kalarm_bin kalarm_resource_xml kalarmdir_resource_xml)
Laurent Montel's avatar
Laurent Montel committed
137
add_dependencies(kalarm_bin kmail_xml)
138

Laurent Montel's avatar
Laurent Montel committed
139
set_target_properties(kalarm_bin PROPERTIES OUTPUT_NAME kalarm)
140

David Jarvie's avatar
David Jarvie committed
141
142
143
144
target_link_libraries(kalarm_bin
KF5::AlarmCalendar
KF5::CalendarCore
KF5::CalendarUtils
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
145
KF5::Contacts
David Jarvie's avatar
David Jarvie committed
146
KF5::Mime
Laurent Montel's avatar
Laurent Montel committed
147
KF5::IdentityManagement
David Jarvie's avatar
David Jarvie committed
148
149
150
151
152
KF5::MailTransport
KF5::AkonadiCore
KF5::AkonadiMime
KF5::AkonadiContact
KF5::Holidays
153
KF5::Codecs
David Jarvie's avatar
David Jarvie committed
154
kdepim
Laurent Montel's avatar
Laurent Montel committed
155
Phonon::phonon4qt5
Laurent Montel's avatar
Laurent Montel committed
156
KF5::Auth
157
KF5::DBusAddons
Laurent Montel's avatar
Laurent Montel committed
158
pimcommon
David Jarvie's avatar
David Jarvie committed
159
)
160

Laurent Montel's avatar
Laurent Montel committed
161
162
163
164
if (Qt5X11Extras_FOUND)
  target_link_libraries(kalarm_bin Qt5::X11Extras)
endif()

165

166
install(TARGETS kalarm_bin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
167
#endif (UNIX)
168
169
170

########### install files ###############

171
172
173
174
175
176
install(PROGRAMS org.kde.kalarm.desktop  DESTINATION ${KDE_INSTALL_APPDIR})
install(PROGRAMS kalarm.autostart.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})
install(FILES kalarm.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
install(FILES kalarmconfig.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install(FILES kalarmui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kalarm)
install(FILES org.kde.kalarm.kalarm.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR})
177
178
179

########### KAuth helper ###############

Laurent Montel's avatar
Laurent Montel committed
180
add_executable(kalarm_helper rtcwakeaction.cpp kalarm_debug.cpp)
Laurent Montel's avatar
Laurent Montel committed
181
target_link_libraries(kalarm_helper KF5::Auth KF5::KDELibs4Support)
182
install(TARGETS kalarm_helper DESTINATION ${KDE_INSTALL_LIBEXECDIR})
Laurent Montel's avatar
Laurent Montel committed
183
184
kauth_install_helper_files(kalarm_helper org.kde.kalarmrtcwake root)
kauth_install_actions(org.kde.kalarmrtcwake rtcwakeaction.actions)