CMakeLists.txt 7.37 KB
Newer Older
1 2
project(korganizer)

3 4
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
Laurent Montel's avatar
Laurent Montel committed
5
add_definitions(-DTRANSLATION_DOMAIN=\"korganizer\")
6

Allen Winter's avatar
Allen Winter committed
7 8 9
include_directories(
  ${CMAKE_CURRENT_BINARY_DIR}
)
10

11 12
if(BUILD_TESTING)
   add_subdirectory(tests)
13 14
   add_subdirectory(autotests)
endif()
15
add_subdirectory(interfaces)
16 17 18 19
add_subdirectory(pixmaps)
add_subdirectory(sounds)
add_subdirectory(plugins)
add_subdirectory(kcmconfigs)
20 21 22
add_subdirectory(kontactplugin)
add_subdirectory(views/collectionview)
add_subdirectory(kconf_update)
23

24 25
set(PERL ${PERL_EXECUTABLE})
configure_file(
Laurent Montel's avatar
Laurent Montel committed
26
  ${CMAKE_CURRENT_SOURCE_DIR}/data/ical2vcal.cmake ${CMAKE_CURRENT_BINARY_DIR}/ical2vcal @ONLY
27
)
28

Allen Winter's avatar
Allen Winter committed
29
########### next target ###############
30

31 32 33 34 35 36
set(korganizer_SRCS
  main.cpp
  korganizer.cpp
  koapp.cpp
  korganizer_debug.cpp
)
37

38 39
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/*-apps-korganizer.png")
ecm_add_app_icon(korganizer_SRCS ICONS ${ICONS_SRCS})
40

41
add_executable(korganizer ${korganizer_SRCS})
42

43 44 45 46 47 48 49 50 51
target_link_libraries(korganizer
  KF5::KontactInterface
  KF5::CalendarCore
  kdepim
  kdepimdbusinterfaces
  korganizerprivate
  korganizer_interfaces
  korganizer_core
)
52

53 54 55
install(TARGETS
  korganizer ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
)
56 57 58

########### next target ###############

59 60 61 62 63 64
set(kcm_korganizer_PART_SRCS
  kcmdesignerfields.cpp
  korganizer_debug.cpp
  prefs/koprefsdialog.cpp
  widgets/kitemiconcheckcombo.cpp
)
65

66 67
add_library(kcm_korganizer MODULE ${kcm_korganizer_PART_SRCS})
generate_export_header(kcm_korganizer BASE_NAME kcm_korganizer) 
68

69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
target_link_libraries(kcm_korganizer
  KF5::AkonadiCalendar
  calendarsupport
  eventviews
  incidenceeditorsng
  kdepim
  korganizer_core
  korganizerprivate
  Qt5::UiTools
  KF5::CalendarCore
  KF5::Holidays
  KF5::MailTransport
  Qt5::UiTools
  pimcommon
)
84

85 86 87 88
install(TARGETS
  kcm_korganizer
  DESTINATION ${KDE_INSTALL_PLUGINDIR}
)
89 90 91

########### next target ###############

92
set(korganizerpart_PART_SRCS korganizer_part.cpp korganizer_debug.cpp)
93

94
add_library(korganizerpart MODULE ${korganizerpart_PART_SRCS})
95

96 97 98 99 100 101 102 103 104
target_link_libraries(korganizerpart
  calendarsupport
  korganizer_core
  korganizer_interfaces
  korganizerprivate
  KF5::AkonadiCore
  KF5::CalendarCore
  KF5::CalendarUtils
)
105

106 107 108 109
install(TARGETS
  korganizerpart
  DESTINATION ${KDE_INSTALL_PLUGINDIR}
)
110

Allen Winter's avatar
Allen Winter committed
111

112
########### next target ###############
113

114
set(korganizer_core_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
115
  prefs/koprefs.cpp
116
  kocore.cpp
Laurent Montel's avatar
Laurent Montel committed
117
  korganizer_debug.cpp
118
)
119

120
kconfig_add_kcfg_files(korganizer_core_LIB_SRCS settings/koprefs_base.kcfgc)
121

122
add_library(korganizer_core ${korganizer_core_LIB_SRCS})
Laurent Montel's avatar
Laurent Montel committed
123
generate_export_header(korganizer_core BASE_NAME korganizer_core)
124 125

target_link_libraries(korganizer_core
Laurent Montel's avatar
Laurent Montel committed
126 127 128
PUBLIC
  korganizer_interfaces
PRIVATE
129 130
  calendarsupport
  eventviews
Laurent Montel's avatar
Laurent Montel committed
131
  KF5::IdentityManagement
132
)
133

134 135 136 137
target_include_directories(korganizer_core PUBLIC
  "$<BUILD_INTERFACE:${korganizer_SOURCE_DIR};${korganizer_BINARY_DIR}>"
)

138
set_target_properties(korganizer_core PROPERTIES
Laurent Montel's avatar
Laurent Montel committed
139 140
  VERSION ${KDEPIM_LIB_VERSION}
  SOVERSION ${KDEPIM_LIB_SOVERSION}
141 142 143
)

install(TARGETS
144
  korganizer_core ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
145
)
146 147 148

########### next target ###############

149 150

set(korganizerprivate_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
151
    korganizer_debug.cpp
Laurent Montel's avatar
Laurent Montel committed
152
    korgmigrateapplication.cpp 
153 154 155
    aboutdata.cpp
    actionmanager.cpp
    akonadicollectionview.cpp
156 157 158
    views/collectionview/reparentingmodel.cpp
    views/collectionview/controller.cpp
    views/collectionview/calendardelegate.cpp
159
    views/collectionview/quickview.cpp
160 161 162 163
    calendarview.cpp
    datechecker.cpp
    datenavigator.cpp
    datenavigatorcontainer.cpp
Laurent Montel's avatar
Laurent Montel committed
164 165
    dialog/exportwebdialog.cpp
    dialog/filtereditdialog.cpp
Laurent Montel's avatar
Laurent Montel committed
166
    job/htmlexportjob.cpp
Laurent Montel's avatar
Laurent Montel committed
167
    widgets/kdatenavigator.cpp
168 169 170 171 172
    kocheckableproxymodel.cpp
    kocorehelper.cpp
    kodaymatrix.cpp
    kodialogmanager.cpp
    koeventpopupmenu.cpp
Laurent Montel's avatar
Laurent Montel committed
173
    dialog/noteeditdialog.cpp
174
    koeventview.cpp
Laurent Montel's avatar
Laurent Montel committed
175
    dialog/koeventviewerdialog.cpp
176 177
    koglobals.cpp
    kohelper.cpp
Laurent Montel's avatar
Laurent Montel committed
178
    impl/korganizerifaceimpl.cpp
179 180
    koviewmanager.cpp
    kowindowlist.cpp
Laurent Montel's avatar
Laurent Montel committed
181
    widgets/navigatorbar.cpp
Laurent Montel's avatar
Laurent Montel committed
182
    dialog/searchdialog.cpp
Laurent Montel's avatar
Laurent Montel committed
183
    helper/searchcollectionhelper.cpp
184 185 186 187 188 189 190 191 192 193 194
    views/agendaview/koagendaview.cpp
    views/journalview/kojournalview.cpp
    views/listview/kolistview.cpp
    views/monthview/monthview.cpp
    views/multiagendaview/multiagendaview.cpp
    views/timelineview/kotimelineview.cpp
    views/timespentview/kotimespentview.cpp
    views/todoview/kotodoview.cpp
    views/whatsnextview/kowhatsnextview.cpp
  )

195
kconfig_add_kcfg_files(korganizerprivate_LIB_SRCS settings/htmlexportsettings.kcfgc)
196

197
ki18n_wrap_ui(korganizerprivate_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
198 199
    ui/filteredit_base.ui
    ui/kogroupwareprefspage.ui
200
    views/multiagendaview/multiagendaviewconfigwidget.ui
Laurent Montel's avatar
Laurent Montel committed
201
    ui/searchdialog_base.ui
202
    views/collectionview/quickview.ui
203
)
204

205
qt5_add_resources(korganizerprivate_LIB_SRCS
206 207
    agendaitem_pixmaps/agendaitemtheme.qrc)

208
qt5_add_dbus_adaptor(korganizerprivate_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
209
    data/org.kde.korganizer.Korganizer.xml impl/korganizerifaceimpl.h
210
    KOrganizerIfaceImpl
211
)
212

213
qt5_add_dbus_adaptor(korganizerprivate_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
214
    data/org.kde.Korganizer.Calendar.xml actionmanager.h
215
    ActionManager calendaradaptor KOrgCalendarAdaptor
216
)
217

218
qt5_add_dbus_interfaces(korganizerprivate_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
219
    data/org.kde.korganizer.Korganizer.xml
220
)
221

222
qt5_add_dbus_interfaces(korganizerprivate_LIB_SRCS
223
    ${CMAKE_SOURCE_DIR}/korgac/org.kde.korganizer.KOrgac.xml
224
)
225

226
qt5_add_dbus_interfaces(korganizerprivate_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
227
    ${CMAKE_SOURCE_DIR}/korganizer/data/org.kde.korganizer.Korganizer.xml
228
)
229

230 231
add_library(korganizerprivate ${korganizerprivate_LIB_SRCS})
generate_export_header(korganizerprivate BASE_NAME korganizerprivate)
232

233
target_link_libraries(korganizerprivate
Laurent Montel's avatar
Laurent Montel committed
234
PUBLIC
235
    pimcommon
Laurent Montel's avatar
Laurent Montel committed
236
PRIVATE
237 238 239
    calendarsupport
    eventviews
    incidenceeditorsng
Allen Winter's avatar
Allen Winter committed
240
    kdepim
241 242
    kdepimdbusinterfaces
    korganizer_core
Allen Winter's avatar
Allen Winter committed
243
    korganizer_interfaces
Laurent Montel's avatar
Laurent Montel committed
244
    KF5::AkonadiCore
245 246 247
    KF5::AkonadiCalendar
    KF5::AkonadiNotes
    KF5::AkonadiSearchPIM
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
248
    KF5::Contacts
Laurent Montel's avatar
Laurent Montel committed
249 250 251
    KF5::CalendarCore
    KF5::CalendarUtils
    KF5::Holidays
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
252
    KF5::Mime
Laurent Montel's avatar
Laurent Montel committed
253
    KF5::IdentityManagement
Laurent Montel's avatar
Laurent Montel committed
254 255
    KF5::KCMUtils
    KF5::NewStuff
256
    calendarsupportcollectionpage
257
)
Allen Winter's avatar
Allen Winter committed
258

259
target_include_directories(korganizerprivate PUBLIC
260
    "$<BUILD_INTERFACE:${korganizer_SOURCE_DIR};${korganizer_BINARY_DIR}>"
261
)
262

263
set_target_properties(korganizerprivate PROPERTIES
Laurent Montel's avatar
Laurent Montel committed
264 265
    VERSION ${KDEPIM_LIB_VERSION}
    SOVERSION ${KDEPIM_LIB_SOVERSION}
266
)
267

268
install(TARGETS
269
    korganizerprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
270
    LIBRARY NAMELINK_SKIP
271
)
Allen Winter's avatar
Allen Winter committed
272

273
########### install files ###############
274

275
install(FILES
Laurent Montel's avatar
Laurent Montel committed
276
    settings/korganizer.kcfg
277
    DESTINATION ${KDE_INSTALL_KCFGDIR}
278
)
279

280
install(FILES
Laurent Montel's avatar
Laurent Montel committed
281
    data/korganizer_part.rc
282
    DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/korganizer
283
)
284

285
install(FILES
286
    dbuscalendar.desktop
287
    DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}
288
)
289

290
install(FILES
Laurent Montel's avatar
Laurent Montel committed
291
    korganizer_part.desktop data/webcal.protocol
292
    DESTINATION ${KDE_INSTALL_KSERVICES5DIR}
293
)
294

295
install(FILES
Laurent Montel's avatar
Laurent Montel committed
296
    data/korganizerui.rc
297
    DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/korganizer
298
)
299

300
install(FILES
Laurent Montel's avatar
Laurent Montel committed
301
    data/org.kde.Korganizer.Calendar.xml data/org.kde.korganizer.Korganizer.xml
302
    DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR}
303
)
304

305
install(FILES
Laurent Montel's avatar
Laurent Montel committed
306
    data/korganizer.knsrc
307
    DESTINATION ${KDE_INSTALL_CONFDIR}
308
)
309

310
install(PROGRAMS
Laurent Montel's avatar
Laurent Montel committed
311
    org.kde.korganizer.desktop korganizer-import.desktop
312
    DESTINATION ${KDE_INSTALL_APPDIR}
313
)
314

315
install(FILES
316
    korganizer.appdata.xml
317
    DESTINATION ${KDE_INSTALL_METAINFODIR}
318
)
319

320
install(PROGRAMS
321
    ${CMAKE_CURRENT_BINARY_DIR}/ical2vcal
322
    DESTINATION ${KDE_INSTALL_BINDIR}
323
)