CMakeLists.txt 5.3 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
    ${CMAKE_SOURCE_DIR}
Laurent Montel's avatar
Laurent Montel committed
18
    ${CMAKE_SOURCE_DIR}/libkdepim/
19
20
    ${Boost_INCLUDE_DIR}
)
Laurent Montel's avatar
Laurent Montel committed
21

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


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

David Jarvie's avatar
David Jarvie committed
56
set(kalarm_bin_SRCS ${libkalarm_SRCS}
Laurent Montel's avatar
Laurent Montel committed
57
    kalarm_debug.cpp
Stephen Kelly's avatar
Stephen Kelly committed
58
    birthdaydlg.cpp
59
    birthdaymodel.cpp
Stephen Kelly's avatar
Stephen Kelly committed
60
61
    main.cpp
    editdlg.cpp
62
    editdlgtypes.cpp
Stephen Kelly's avatar
Stephen Kelly committed
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    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
80
    alarmtime.cpp
Stephen Kelly's avatar
Stephen Kelly committed
81
82
83
84
85
    alarmtimewidget.cpp
    specialactions.cpp
    reminder.cpp
    startdaytimer.cpp
    eventlistview.cpp
86
    alarmlistdelegate.cpp
Stephen Kelly's avatar
Stephen Kelly committed
87
88
89
90
91
92
93
94
95
    alarmlistview.cpp
    templatelistview.cpp
    kamail.cpp
    timeselector.cpp
    latecancel.cpp
    repetitionbutton.cpp
    emailidcombo.cpp
    find.cpp
    pickfileradio.cpp
96
97
98
    newalarmaction.cpp
    commandoptions.cpp
    resourceselector.cpp
Stephen Kelly's avatar
Stephen Kelly committed
99
100
101
    templatepickdlg.cpp
    templatedlg.cpp
    templatemenuaction.cpp
102
    wakedlg.cpp
David Jarvie's avatar
David Jarvie committed
103
)
104
105
set(kalarm_bin_SRCS ${kalarm_bin_SRCS}
    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)
Laurent Montel's avatar
Laurent Montel committed
120
#REACTIVATE qt5_add_dbus_interfaces(kalarm_bin_SRCS ${KDE4_DBUS_INTERFACES_DIR}/org.kde.KSpeech.xml)
121

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

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

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

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

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

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

David Jarvie's avatar
David Jarvie committed
142
143
144
145
target_link_libraries(kalarm_bin
KF5::AlarmCalendar
KF5::CalendarCore
KF5::CalendarUtils
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
146
KF5::Contacts
David Jarvie's avatar
David Jarvie committed
147
KF5::Mime
Laurent Montel's avatar
Laurent Montel committed
148
KF5::IdentityManagement
David Jarvie's avatar
David Jarvie committed
149
150
151
152
153
KF5::MailTransport
KF5::AkonadiCore
KF5::AkonadiMime
KF5::AkonadiContact
KF5::Holidays
154
KF5::Codecs
David Jarvie's avatar
David Jarvie committed
155
156
kdepim
KF5::KCMUtils
Laurent Montel's avatar
Laurent Montel committed
157
Phonon::phonon4qt5
Laurent Montel's avatar
Laurent Montel committed
158
KF5::Auth
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
177
178
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})
install(FILES kalarm.upd DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
install(PROGRAMS kalarm-version.pl kalarm-1.2.1-general.pl kalarm-1.9.5-defaults.pl kalarm-2.0.2-general.pl kalarm-2.1.5-general.pl DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
179
180
181

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

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