CMakeLists.txt 5.88 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# The following macros can be defined to alter behavior.
# (if desired, use add_definitions() to define them)
#
# EVENTVIEWS_NODECOS - turns-off decoration plugins in views.
#                No idea why you would want to define this, perhaps to save
#                screen real estate? But there are a config options for that.


add_definitions(-DTRANSLATION_DOMAIN=\"libeventviews\")

if(KDEPIM_BUILD_EXAMPLES)
  add_subdirectory(viewerapp)
endif()

option(EVENTVIEWS_NODECOS "Turn-off decoration plugins in views." FALSE)

if(EVENTVIEWS_NODECOS)
  add_definitions(-DEVENTVIEWS_NODECOS)
endif()

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

set(eventviews_LIB_SRCS
  eventview_p.cpp
  eventview.cpp
  helper.cpp
  prefs.cpp

  # Agenda view specific code.
  agenda/agenda.cpp
  agenda/agendaitem.cpp
  agenda/agendaview.cpp
  agenda/alternatelabel.cpp
  agenda/calendardecoration.cpp
  agenda/decorationlabel.cpp
  agenda/timelabels.cpp
  agenda/timelabelszone.cpp
  agenda/timescaleconfigdialog.cpp
  agenda/viewcalendar.cpp

  journal/journalframe.cpp
  journal/journalview.cpp

  list/listview.cpp

  month/monthgraphicsitems.cpp
  month/monthitem.cpp
  month/monthscene.cpp
  month/monthview.cpp

  multiagenda/multiagendaview.cpp

  todo/tododelegates.cpp
  todo/todomodel.cpp
  todo/incidencetreemodel.cpp

  todo/todoviewquickaddline.cpp
  todo/todoviewquicksearch.cpp
  todo/todoviewsortfilterproxymodel.cpp
  todo/todoviewview.cpp
  todo/todoview.cpp

  timeline/timelineview.cpp
  timeline/timelineitem.cpp
  timeline/timelineview_p.cpp

  whatsnext/whatsnextview.cpp
)

kconfig_add_kcfg_files(eventviews_LIB_SRCS prefs_base.kcfgc)

72
ecm_qt_declare_logging_category(eventviews_LIB_SRCS HEADER calendarview_debug.h
Laurent Montel's avatar
Laurent Montel committed
73
74
75
76
77
        IDENTIFIER CALENDARVIEW_LOG
        CATEGORY_NAME org.kde.pim.calendarview
        OLD_CATEGORY_NAMES log_calendarview
        DESCRIPTION "kdepim (eventviews)" EXPORT EVENTVIEWS)

78
79
80
81
82
83
84
85
ki18n_wrap_ui(eventviews_LIB_SRCS
  agenda/timescaleedit_base.ui
)

add_library(KF5EventViews ${eventviews_LIB_SRCS})
generate_export_header(KF5EventViews BASE_NAME eventviews)

add_library(KF5::EventViews ALIAS KF5EventViews)
Laurent Montel's avatar
Laurent Montel committed
86

87
88
89
90
91
92
93
94
95
target_link_libraries(KF5EventViews
PUBLIC
  KF5::AkonadiCore
  KF5::CalendarSupport

  KF5::CalendarCore
  KF5::CalendarUtils
  KF5::AkonadiCalendar
PRIVATE
96
  KF5::Holidays
Daniel Vrátil's avatar
Daniel Vrátil committed
97
98
99
100
101
  KF5::Completion
  KF5::Service
  KF5::IconThemes
  KF5::GuiAddons
  KF5::I18n
Laurent Montel's avatar
Laurent Montel committed
102
  KF5::Libkdepim
103
  KF5::Codecs
Laurent Montel's avatar
Laurent Montel committed
104
  KGantt
105
  KF5::AkonadiWidgets
Laurent Montel's avatar
Laurent Montel committed
106
  KF5::Contacts
107
108
109
110
111
112
)

target_include_directories(KF5EventViews INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/EventViews/;${KDE_INSTALL_INCLUDEDIR_KF5}/eventviews>")
target_include_directories(KF5EventViews PUBLIC "$<BUILD_INTERFACE:${eventviews_SOURCE_DIR}/src;${eventviews_BINARY_DIR}/src;>")

set_target_properties(KF5EventViews PROPERTIES
113
114
115
  VERSION ${EVENTVIEWS_VERSION_STRING}
  SOVERSION ${EVENTVIEWS_SOVERSION}
  EXPORT_NAME EventViews
116
117
118
)

install(TARGETS
119
120
  KF5EventViews
  EXPORT KF5EventViewsTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
121
122
123
124
)

ecm_generate_headers(eventviews_CamelCase_HEADERS
  HEADER_NAMES
125
  Helper
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
  Prefs
  EventView
  REQUIRED_HEADERS eventviews_CamelCase_HEADERS
  PREFIX EventViews
)

ecm_generate_headers(eventviews_CamelCaseagenda_HEADERS
  HEADER_NAMES
  CalendarDecoration
  AgendaView
  ViewCalendar
  REQUIRED_HEADERS eventviews_agenda_HEADERS
  PREFIX EventViews
  RELATIVE agenda
)

ecm_generate_headers(eventviews_CamelCasetodo_HEADERS
  HEADER_NAMES
  TodoView
  REQUIRED_HEADERS eventviews_todo_HEADERS
  PREFIX EventViews
  RELATIVE todo
)

ecm_generate_headers(eventviews_CamelCasemonth_HEADERS
  HEADER_NAMES
  MonthView
  REQUIRED_HEADERS eventviews_month_HEADERS
  PREFIX EventViews
  RELATIVE month
)

ecm_generate_headers(eventviews_CamelCaselist_HEADERS
  HEADER_NAMES
  ListView
  REQUIRED_HEADERS eventviews_list_HEADERS
  PREFIX EventViews
  RELATIVE list
)

ecm_generate_headers(eventviews_CamelCasejournal_HEADERS
  HEADER_NAMES
  JournalView
  REQUIRED_HEADERS eventviews_journal_HEADERS
  PREFIX EventViews
  RELATIVE journal
)

ecm_generate_headers(eventviews_CamelCasemultiagenda_HEADERS
  HEADER_NAMES
  MultiAgendaView
  ConfigDialogInterface
  REQUIRED_HEADERS eventviews_multiagenda_HEADERS
  PREFIX EventViews
  RELATIVE multiagenda
)

ecm_generate_headers(eventviews_CamelCasetimeline_HEADERS
  HEADER_NAMES
  TimeLineView
  REQUIRED_HEADERS eventviews_timeline_HEADERS
  PREFIX EventViews
  RELATIVE timeline
)

ecm_generate_headers(eventviews_CamelCasewhatsnext_HEADERS
  HEADER_NAMES
  WhatsNextView
  REQUIRED_HEADERS eventviews_whatsnext_HEADERS
  PREFIX EventViews
  RELATIVE whatsnext
)
198

199
ecm_generate_pri_file(BASE_NAME EventViews
200
201
202
  LIB_NAME KF5EventViews
  DEPS "Mime AkonadiCalendar" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR
  ${KDE_INSTALL_INCLUDEDIR_KF5}/EventViews
203
204
205
)

install(FILES
206
207
208
209
210
211
212
213
214
215
216
  ${eventviews_CamelCase_HEADERS}
  ${eventviews_CamelCaseagenda_HEADERS}
  ${eventviews_CamelCasetodo_HEADERS}
  ${eventviews_CamelCasewhatsnext_HEADERS}
  ${eventviews_CamelCasetimeline_HEADERS}
  ${eventviews_CamelCasemultiagenda_HEADERS}
  ${eventviews_CamelCasejournal_HEADERS}
  ${eventviews_CamelCaselist_HEADERS}
  ${eventviews_CamelCasemonth_HEADERS}
  DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/EventViews
  COMPONENT Devel
217
218
219
)

install(FILES
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
  ${eventviews_HEADERS}
  ${CMAKE_CURRENT_BINARY_DIR}/eventviews_export.h
  ${eventviews_CamelCase_HEADERS}
  ${eventviews_agenda_HEADERS}
  ${eventviews_todo_HEADERS}
  ${eventviews_whatsnext_HEADERS}
  ${eventviews_timeline_HEADERS}
  ${eventviews_multiagenda_HEADERS}
  ${eventviews_journal_HEADERS}
  ${eventviews_list_HEADERS}
  ${eventviews_month_HEADERS}
  DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/eventviews
  COMPONENT Devel
)

install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
236
ecm_qt_install_logging_categories(EXPORT EVENTVIEWS FILE eventviews.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
237
238

install(FILES agenda/calendardecoration.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR})