CMakeLists.txt 18.9 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12


add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )


add_definitions(-DTRANSLATION_DOMAIN=\"libmessageviewer\")

# KCFG files:
# The main messageviewer.kcfg is configured by CMake and put in the build directory.

if(KDEPIM_ENTERPRISE_BUILD)
Laurent Montel's avatar
Laurent Montel committed
13
14
15
16
    set(LEGACY_MANGLE_FROM_TO_HEADERS true)
    set(LEGACY_BODY_INVITES true)
    set(EXCHANGE_COMPATIBLE_INVITATIONS true)
    set(OUTLOOK_COMPATIBLE_INVITATION_REPLY_COMMENTS true)
17
else()
Laurent Montel's avatar
Laurent Montel committed
18
19
20
21
    set(LEGACY_MANGLE_FROM_TO_HEADERS false)
    set(LEGACY_BODY_INVITES false)
    set(EXCHANGE_COMPATIBLE_INVITATIONS false)
    set(OUTLOOK_COMPATIBLE_INVITATION_REPLY_COMMENTS false)
22
23
24
25
26
27
28
29
30
31
32
33
endif()

configure_file(settings/messageviewer.kcfg.cmake ${CMAKE_CURRENT_BINARY_DIR}/messageviewer.kcfg)
include(CheckIncludeFiles)
check_include_files(sys/inotify.h SYS_INOTIFY_H_FOUND)
macro_bool_to_01(SYS_INOTIFY_H_FOUND HAVE_SYS_INOTIFY_H)
configure_file(config-messageviewer.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-messageviewer.h)

# target_include_directories does not handle empty include paths
include_directories(${GPGME_INCLUDES})

if(BUILD_TESTING)
Laurent Montel's avatar
Laurent Montel committed
34
35
36
37
    add_subdirectory(scamdetection/autotests)
    add_subdirectory(findbar/autotests)
    add_subdirectory(scamdetection/tests)
    add_subdirectory(adblock/tests/)
Laurent Montel's avatar
Laurent Montel committed
38
    add_subdirectory(adblock/common/autotests)
Laurent Montel's avatar
Laurent Montel committed
39
    add_subdirectory(viewerplugins/tests/)
Laurent Montel's avatar
Laurent Montel committed
40
    add_subdirectory(htmlwriter/autotests/)
Laurent Montel's avatar
Laurent Montel committed
41
    if (QTWEBENGINE_SUPPORT_OPTION)
Laurent Montel's avatar
Laurent Montel committed
42
        add_subdirectory(webengine/tests)
Laurent Montel's avatar
Laurent Montel committed
43
        add_subdirectory(webengine/webengineaccesskey/autotests)
Laurent Montel's avatar
Laurent Montel committed
44
45
    endif()

46
47
48
49
50
51
endif()
add_subdirectory(pics)
add_subdirectory(kconf_update)
add_subdirectory(about)

if(DEBUG_SIGNATURE)
Laurent Montel's avatar
Laurent Montel committed
52
    add_definitions(-DDEBUG_SIGNATURE)
53
54
endif()

Laurent Montel's avatar
Laurent Montel committed
55
set(_mailwebview_cpp 
Laurent Montel's avatar
Laurent Montel committed
56

Laurent Montel's avatar
Laurent Montel committed
57
58
59
60
61
62
    adblock/common/adblocksettingwidget.cpp
    adblock/common/adblockutil.cpp
    adblock/common/adblockaddsubscriptiondialog.cpp
    adblock/common/adblocklistwidget.cpp
    adblock/common/adblocksyntaxhighlighter.cpp
    adblock/common/adblockshowlistdialog.cpp
63
    adblock/common/adblockautomaticruleslistwidget.cpp
Laurent Montel's avatar
Laurent Montel committed
64
    )
65

66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
if (NOT MESSAGEVIEWER_USE_QTWEBENGINE)
    set(_mailwebview_cpp
        adblock/common/adblockcreatefilterdialog.cpp
        adblock/common/matcher/adblockrule.cpp
        adblock/common/matcher/adblockruletextmatchimpl.cpp
        adblock/common/matcher/adblockrulenullimpl.cpp
        adblock/common/matcher/adblockhostmatcher.cpp
        adblock/adblockelementhiding.cpp
        adblock/adblockmanager.cpp
        adblock/adblockrulefallbackimpl.cpp
        adblock/adblockblockableitemsdialog.cpp
        adblock/adblockblockableitemswidget.cpp
        ${_mailwebview_cpp}
        )
endif()
81

82
if (NOT MESSAGEVIEWER_USE_QTWEBENGINE)
Laurent Montel's avatar
indent    
Laurent Montel committed
83
84
85
86
87
88
89
    set(libmessageviewer_mailviewer_SRCS
        viewer/webview/mailwebview.cpp
        viewer/webview/webpage.cpp
        viewer/webview/networkaccessmanager.cpp
        viewer/webview/webviewaccesskey.cpp
        )
    set(libmessageviewer_web_LIB KF5::WebKit Qt5::WebKitWidgets)
90
endif()
Laurent Montel's avatar
Laurent Montel committed
91

Laurent Montel's avatar
Laurent Montel committed
92
if (QTWEBENGINE_SUPPORT_OPTION)
Laurent Montel's avatar
Laurent Montel committed
93
94
95
    set(libmessageviewer_mailviewer_SRCS
        viewer/webengine/mailwebengineview.cpp
        viewer/webengine/mailwebenginepage.cpp
96
97
98
        viewer/webengine/loadexternalreferencesurlinterceptor/loadexternalreferencesurlinterceptor.cpp
        viewer/webengine/cidreferencesurlinterceptor/cidreferencesurlinterceptor.cpp

Laurent Montel's avatar
Laurent Montel committed
99
100
101
        ${libmessageviewer_mailviewer_SRCS}
        findbar/findbarwebengineview.cpp
        )
Laurent Montel's avatar
Laurent Montel committed
102
103

    set(libmessageviewer_webengine_SRCS
Laurent Montel's avatar
Laurent Montel committed
104
105
106
107
108
109
        webengine/networkmanager/networkaccessmanagerwebengine.cpp
        webengine/urlinterceptor/networkurlinterceptor.cpp
        webengine/urlinterceptor/networkpluginurlinterceptorinterface.cpp
        webengine/urlinterceptor/networkurlinterceptorpluginmanager.cpp
        webengine/urlinterceptor/networkpluginurlinterceptor.cpp
        webengine/urlinterceptor/networkurlinterceptormanager.cpp
110
        webengine/urlinterceptor/networkpluginurlinterceptorconfigurewidget.cpp
Laurent Montel's avatar
Laurent Montel committed
111
        webengine/webhittestresult.cpp
Laurent Montel's avatar
Laurent Montel committed
112
        webengine/webhittest.cpp
Laurent Montel's avatar
Laurent Montel committed
113
        webengine/webenginepage.cpp
114
        webengine/webenginescript.cpp
Laurent Montel's avatar
Laurent Montel committed
115
        webengine/webengineview.cpp
Laurent Montel's avatar
Laurent Montel committed
116
        webengine/webengineaccesskey/webengineaccesskey.cpp
Laurent Montel's avatar
Laurent Montel committed
117
118
        webengine/webengineaccesskey/webengineaccesskeyanchor.cpp
        webengine/webengineaccesskey/webengineaccesskeyutils.cpp
Laurent Montel's avatar
Laurent Montel committed
119
        )
120
    set(libmessageviewer_web_LIB Qt5::WebEngineWidgets ${libmessageviewer_web_LIB})
Laurent Montel's avatar
Laurent Montel committed
121
endif()
Laurent Montel's avatar
Laurent Montel committed
122

123
set(libmessageviewer_viewer_SRCS
Laurent Montel's avatar
Laurent Montel committed
124
    viewer/bodypartformatterfactory.cpp
125
    viewer/bodypartformatterfactorysingleton.cpp
Laurent Montel's avatar
Laurent Montel committed
126
127
128
129
130
131
132
133
134
135
    viewer/csshelper.cpp
    viewer/editorwatcher.cpp
    viewer/objecttreeemptysource.cpp
    viewer/objecttreeviewersource.cpp
    viewer/pluginloaderbase.cpp
    viewer/viewer.cpp
    viewer/viewer_p.cpp
    viewer/messagedisplayformatattribute.cpp
    viewer/urlhandlermanager.cpp
    viewer/mimeparttree/mimeparttreeview.cpp
136
    viewer/mimeparttree/mimetreemodel.cpp
Laurent Montel's avatar
Laurent Montel committed
137
    )
138
139

set(libmessageviewer_widgets_SRCS
Laurent Montel's avatar
Laurent Montel committed
140
141
142
143
144
145
146
147
148
149
150
    widgets/attachmentdialog.cpp
    widgets/configurewidget.cpp
    widgets/printingsettings.cpp
    widgets/htmlstatusbar.cpp
    widgets/vcardviewer.cpp
    widgets/invitationsettings.cpp
    widgets/openattachmentfolderwidget.cpp
    widgets/mailsourceviewer.cpp
    widgets/mailsourceviewtextbrowserwidget.cpp
    widgets/zoomactionmenu.cpp
    )
151

Laurent Montel's avatar
Laurent Montel committed
152
if (QTWEBENGINE_SUPPORT_OPTION)
153
    set(libmessageviewer_widgets_webengine_SRCS
Laurent Montel's avatar
indent    
Laurent Montel committed
154
155
        widgets/mailsourcewebengineviewer.cpp
        )
156
157
endif()

158
set(libmessageviewer_header_SRCS
Laurent Montel's avatar
Laurent Montel committed
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
    header/contactdisplaymessagememento.cpp
    header/headerstrategy.cpp
    header/richheaderstrategy.cpp
    header/headerstyle.cpp
    header/grantleeheaderstyle.cpp
    header/plainheaderstyle.cpp
    header/headerstyle_util.cpp
    header/grantleeheaderformatter.cpp
    header/grantleeheaderteststyle.cpp
    header/kxface.cpp
    header/headerstyleplugin.cpp
    header/headerstylepluginmanager.cpp
    header/headerstyleinterface.cpp
    header/headerstylemenumanager.cpp
    )
174
175

set(libmessageviewer_scamdetection_SRCS
Laurent Montel's avatar
Laurent Montel committed
176
177
178
179
    scamdetection/scamdetectionwarningwidget.cpp
    scamdetection/scamdetectiondetailsdialog.cpp
    scamdetection/scamattribute.cpp
    scamdetection/scamcheckshorturl.cpp
180
    scamdetection/scamexpandurljob.cpp
Laurent Montel's avatar
Laurent Montel committed
181
    scamdetection/scamcheckshorturlmanager.cpp
Laurent Montel's avatar
Laurent Montel committed
182
    )
183
184
185
if (NOT MESSAGEVIEWER_USE_QTWEBENGINE)
    set(libmessageviewer_scamdetection_SRCS scamdetection/scamdetection.cpp ${libmessageviewer_scamdetection_SRCS})
endif()
186

Laurent Montel's avatar
Laurent Montel committed
187
if (QTWEBENGINE_SUPPORT_OPTION)
Laurent Montel's avatar
indent    
Laurent Montel committed
188
189
190
    set(libmessageviewer_scamdetection_webengine_SRCS
        scamdetection/scamdetectionwebengine.cpp
        )
191
192
endif()

193
set(libmessageviewer_findbar_SRCS
Laurent Montel's avatar
Laurent Montel committed
194
195
196
    findbar/findbarbase.cpp
    findbar/findbarsourceview.cpp
    )
197
198
199
if (NOT MESSAGEVIEWER_USE_QTWEBENGINE)
    set(libmessageviewer_findbar_SRCS findbar/findbarwebview.cpp ${libmessageviewer_findbar_SRCS})
endif()
200
201

set(libmessageviewer_utils_SRCS
Laurent Montel's avatar
Laurent Montel committed
202
203
204
    utils/markmessagereadhandler.cpp
    utils/messageviewerutil.cpp
    )
205

Laurent Montel's avatar
Laurent Montel committed
206
if (QTWEBENGINE_SUPPORT_OPTION)
207
208
    set(libmessageviewer_htmlwriter_webengine_SRCS
        htmlwriter/webengineparthtmlwriter.cpp
Laurent Montel's avatar
Laurent Montel committed
209
        htmlwriter/webengineembedpart.cpp
Laurent Montel's avatar
indent    
Laurent Montel committed
210
        )
211
212
endif()

213
set(libmessageviewer_htmlwriter_SRCS
Laurent Montel's avatar
Laurent Montel committed
214
    htmlwriter/teehtmlwriter.cpp
215
    ${libmessageviewer_htmlwriter_webengine_SRCS}
Laurent Montel's avatar
Laurent Montel committed
216
    )
217

218
219
220
221
222
223
if (NOT MESSAGEVIEWER_USE_QTWEBENGINE)
    set(libmessageviewer_htmlwriter_SRCS htmlwriter/webkitparthtmlwriter.cpp ${libmessageviewer_htmlwriter_SRCS})
endif()



224
set(libmessageviewer_antispam_SRCS
Laurent Montel's avatar
Laurent Montel committed
225
226
227
    antispam/spamheaderanalyzer.cpp
    antispam/antispamconfig.cpp
    )
228
229

set(libmessageviewer_job_SRCS
Laurent Montel's avatar
Laurent Montel committed
230
231
232
233
234
235
    job/createtodojob.cpp
    job/createeventjob.cpp
    job/createnotejob.cpp
    job/attachmenteditjob.cpp
    job/modifymessagedisplayformatjob.cpp
    )
236
237

set(libmessageviewer_viewerplugins_SRCS
Laurent Montel's avatar
Laurent Montel committed
238
239
240
241
242
    viewerplugins/viewerpluginmanager.cpp
    viewerplugins/viewerplugin.cpp
    viewerplugins/viewerplugininterface.cpp
    viewerplugins/viewerplugintoolmanager.cpp
    )
243
244

set(libmessageviewer_SRCS
245
    ${libmessageviewer_scamdetection_webengine_SRCS}
246
    ${libmessageviewer_widgets_webengine_SRCS}
Laurent Montel's avatar
Laurent Montel committed
247
    ${libmessageviewer_webengine_SRCS}
Laurent Montel's avatar
Laurent Montel committed
248
249
250
251
252
253
254
255
256
257
258
259
260
261
    ${libmessageviewer_viewer_SRCS}
    ${libmessageviewer_widgets_SRCS}
    ${libmessageviewer_header_SRCS}
    ${libmessageviewer_scamdetection_SRCS}
    ${libmessageviewer_findbar_SRCS}
    ${libmessageviewer_utils_SRCS}
    ${libmessageviewer_htmlwriter_SRCS}
    ${libmessageviewer_antispam_SRCS}
    ${libmessageviewer_job_SRCS}
    ${libmessageviewer_viewerplugins_SRCS}
    settings/messageviewersettings.cpp
    ${_mailwebview_cpp}
    ${libmessageviewer_mailviewer_SRCS}
    )
262
263
264
265

ecm_qt_declare_logging_category(libmessageviewer_SRCS HEADER messageviewer_debug.h IDENTIFIER MESSAGEVIEWER_LOG CATEGORY_NAME log_messageviewer)

kconfig_add_kcfg_files(libmessageviewer_SRCS
Laurent Montel's avatar
Laurent Montel committed
266
267
    settings/globalsettings_messageviewer.kcfgc
    )
268
269

ki18n_wrap_ui(libmessageviewer_SRCS
Laurent Montel's avatar
Laurent Montel committed
270
271
272
273
274
275
    ui/settings.ui
    ui/invitationsettings.ui
    ui/printingsettings.ui
    adblock/ui/settings_adblock.ui
    adblock/ui/adblockcreatefilterwidget.ui
    )
276
277
278
279
280
281
282
283
284
285


add_library(KF5MessageViewer ${libmessageviewer_SRCS})
generate_export_header(KF5MessageViewer BASE_NAME messageviewer)
add_library(KF5::MessageViewer ALIAS KF5MessageViewer)

target_include_directories(KF5MessageViewer INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MessageViewer/;${KDE_INSTALL_INCLUDEDIR_KF5}/messageviewer>")
target_include_directories(KF5MessageViewer PUBLIC "$<BUILD_INTERFACE:${MessageViewer_SOURCE_DIR}/src;${MessageViewer_BINARY_DIR}/src;>")

target_link_libraries(KF5MessageViewer
Laurent Montel's avatar
Laurent Montel committed
286
287
288
289
290
291
292
    PUBLIC
    KF5::MessageCore
    KF5::PimCommon
    KF5::AkonadiCore
    KF5::AkonadiMime
    KF5::Contacts
    KF5::Libkleo
293
    KF5::MimeTreeParser
Laurent Montel's avatar
Laurent Montel committed
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
    PRIVATE
    KF5::ItemViews
    ${libmessageviewer_web_LIB}
    KF5::Libkdepim
    KF5::GrantleeTheme
    KF5::KaddressbookGrantlee
    Grantlee5::TextDocument
    Grantlee5::Templates
    KF5::MailTransport
    KF5::Mime
    KF5::Mbox
    KF5::AkonadiNotes
    KF5::PimTextEdit
    KF5::CalendarCore
    KF5::Gravatar
    KF5::IconThemes
    )
311
if (WIN32)
Laurent Montel's avatar
Laurent Montel committed
312
    target_link_libraries(KF5MessageViewer PUBLIC KF5::Gpgmepp)
313
else()
Laurent Montel's avatar
Laurent Montel committed
314
    target_link_libraries(KF5MessageViewer PUBLIC KF5::Gpgmepp-pthread)
315
316
317
318
319
320
321
322
endif()

target_include_directories(KF5MessageViewer PUBLIC $<TARGET_PROPERTY:KF5::WebKit,INTERFACE_INCLUDE_DIRECTORIES>)

set_target_properties(KF5MessageViewer PROPERTIES
    VERSION ${MESSAGEVIEWER_VERSION_STRING}
    SOVERSION ${MESSAGEVIEWER_SOVERSION}
    EXPORT_NAME MessageViewer
Laurent Montel's avatar
Laurent Montel committed
323
    )
324
325
326
327

install(TARGETS
    KF5MessageViewer
    EXPORT KF5MessageViewerTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
Laurent Montel's avatar
Laurent Montel committed
328
    )
329

Laurent Montel's avatar
Laurent Montel committed
330
ecm_generate_headers(MessageViewer_Camelcasewebviewer_HEADERS
Laurent Montel's avatar
Laurent Montel committed
331
332
333
334
335
336
337
338
    HEADER_NAMES
    MailWebView
    WebViewAccessKey
    WebPage
    REQUIRED_HEADERS MessageViewer_webviewer_HEADERS
    PREFIX MessageViewer
    RELATIVE viewer/webview
    )
Laurent Montel's avatar
Laurent Montel committed
339

Laurent Montel's avatar
Laurent Montel committed
340
if (QTWEBENGINE_SUPPORT_OPTION)
Laurent Montel's avatar
Laurent Montel committed
341
342
343
344
    ecm_generate_headers(MessageViewer_Camelcasewebengine_HEADERS
        HEADER_NAMES
        MailWebEnginePage
        MailWebEngineView
345

Laurent Montel's avatar
Laurent Montel committed
346
347
348
349
        REQUIRED_HEADERS MessageViewer_webengine_HEADERS
        PREFIX MessageViewer
        RELATIVE viewer/webengine
        )
Laurent Montel's avatar
Laurent Montel committed
350
351
    ecm_generate_headers(MessageViewer_Camelcasewebengine_accesskey_HEADERS
        HEADER_NAMES
Laurent Montel's avatar
Laurent Montel committed
352
        WebEngineAccessKey
Laurent Montel's avatar
Laurent Montel committed
353
354
355

        REQUIRED_HEADERS MessageViewer_webengine_accesskey_HEADERS
        PREFIX MessageViewer
Laurent Montel's avatar
Laurent Montel committed
356
        RELATIVE webengine/webengineaccesskey
Laurent Montel's avatar
Laurent Montel committed
357
        )
Laurent Montel's avatar
Laurent Montel committed
358
359
    ecm_generate_headers(MessageViewer_Camelcasewebengine_urlinterceptor_HEADERS
        HEADER_NAMES
Laurent Montel's avatar
Laurent Montel committed
360
361
362
363
        NetworkUrlInterceptorPluginManager
        NetworkUrlInterceptor
        NetworkPluginUrlInterceptorInterface
        NetworkPluginUrlInterceptor
364
        NetworkPluginUrlInterceptorConfigureWidget
Laurent Montel's avatar
Laurent Montel committed
365

Laurent Montel's avatar
Laurent Montel committed
366
        REQUIRED_HEADERS MessageViewer_webengine_urlinterceptor_HEADERS
Laurent Montel's avatar
Laurent Montel committed
367
        PREFIX MessageViewer
Laurent Montel's avatar
Laurent Montel committed
368
        RELATIVE webengine/urlinterceptor
Laurent Montel's avatar
Laurent Montel committed
369
        )
370
371
    ecm_generate_headers(MessageViewer_Camelcasewebengine_manager_HEADERS
        HEADER_NAMES
Laurent Montel's avatar
Laurent Montel committed
372
        NetworkAccessManagerWebEngine
373
374
        REQUIRED_HEADERS MessageViewer_webengine_manager_HEADERS
        PREFIX MessageViewer
Laurent Montel's avatar
Laurent Montel committed
375
        RELATIVE webengine/networkmanager
376
        )
Laurent Montel's avatar
Laurent Montel committed
377
378
379
    ecm_generate_headers(MessageViewer_Camelcasewebengine_misc_HEADERS
        HEADER_NAMES
        WebHitTestResult
Laurent Montel's avatar
Laurent Montel committed
380
        WebEnginePage
Laurent Montel's avatar
Laurent Montel committed
381
        WebEngineView
Laurent Montel's avatar
Laurent Montel committed
382
        WebHitTest
Laurent Montel's avatar
Laurent Montel committed
383
        WebEngineScript
Laurent Montel's avatar
Laurent Montel committed
384
385
386
        REQUIRED_HEADERS MessageViewer_webengine_misc_HEADERS
        PREFIX MessageViewer
        RELATIVE webengine/
Laurent Montel's avatar
indent    
Laurent Montel committed
387
        )
Laurent Montel's avatar
Laurent Montel committed
388
endif()
Laurent Montel's avatar
Laurent Montel committed
389

Laurent Montel's avatar
Laurent Montel committed
390
391
392
ecm_generate_headers(MessageViewer_Camelcasescam_HEADERS
    HEADER_NAMES
    ScamExpandUrlJob
Laurent Montel's avatar
Laurent Montel committed
393
    ScamCheckShortUrlManager
Laurent Montel's avatar
Laurent Montel committed
394
    ScamCheckShortUrl
Laurent Montel's avatar
Laurent Montel committed
395
396
397
398
399
400
    REQUIRED_HEADERS MessageViewer_scam_HEADERS
    PREFIX MessageViewer
    RELATIVE scamdetection
    )


401
ecm_generate_headers(MessageViewer_Camelcaseviewer_HEADERS
Laurent Montel's avatar
Laurent Montel committed
402
403
404
405
406
407
    HEADER_NAMES
    Viewer
    CSSHelper
    ObjectTreeEmptySource
    EditorWatcher
    Stl_Util
408
    BodyPartFormatterFactory
Laurent Montel's avatar
Laurent Montel committed
409
410
411
412
    REQUIRED_HEADERS MessageViewer_viewer_HEADERS
    PREFIX MessageViewer
    RELATIVE viewer
    )
413
414

ecm_generate_headers(MessageViewer_Camelcasewidgets_HEADERS
Laurent Montel's avatar
Laurent Montel committed
415
416
417
418
419
420
421
422
423
    HEADER_NAMES
    InvitationSettings
    PrintingSettings
    ConfigureWidget
    ZoomActionMenu
    REQUIRED_HEADERS MessageViewer_widgets_HEADERS
    PREFIX MessageViewer
    RELATIVE widgets
    )
424
425

ecm_generate_headers(MessageViewer_Camelcaseutils_HEADERS
Laurent Montel's avatar
Laurent Montel committed
426
427
428
429
430
431
432
    HEADER_NAMES
    MessageViewerUtil
    MarkMessageReadHandler
    REQUIRED_HEADERS MessageViewer_utils_HEADERS
    PREFIX MessageViewer
    RELATIVE utils
    )
433

434
ecm_generate_headers(MessageViewer_Camelfindbar_HEADERS
Laurent Montel's avatar
Laurent Montel committed
435
436
437
    HEADER_NAMES
    FindBarWebView
    FindBarBase
Laurent Montel's avatar
Laurent Montel committed
438
439
440
441
    REQUIRED_HEADERS MessageViewer_findbar_HEADERS
    PREFIX MessageViewer
    RELATIVE findbar
    )
442

Laurent Montel's avatar
Laurent Montel committed
443
if (QTWEBENGINE_SUPPORT_OPTION)
Laurent Montel's avatar
Laurent Montel committed
444
445
446
447
448
449
450
451
    ecm_generate_headers(MessageViewer_CamelfindbarWebEngine_HEADERS
        HEADER_NAMES
        FindBarWebEngineView
        REQUIRED_HEADERS MessageViewer_findbarWebEngine_HEADERS
        PREFIX MessageViewer
        RELATIVE findbar
        )
endif()
452

453
ecm_generate_headers(MessageViewer_Camelcaseantispam_HEADERS
Laurent Montel's avatar
Laurent Montel committed
454
455
456
457
458
459
    HEADER_NAMES
    SpamHeaderAnalyzer
    REQUIRED_HEADERS MessageViewer_antispam_HEADERS
    PREFIX MessageViewer
    RELATIVE antispam
    )
460
461

ecm_generate_headers(MessageViewer_Camelcaseinterfaces_HEADERS
Laurent Montel's avatar
Laurent Montel committed
462
463
464
465
466
467
468
    HEADER_NAMES
    BodyPartURLHandler
    URLHandler
    REQUIRED_HEADERS MessageViewer_interfaces_HEADERS
    PREFIX MessageViewer
    RELATIVE interfaces
    )
469
470

ecm_generate_headers(MessageViewer_Camelcasesettings_HEADERS
Laurent Montel's avatar
Laurent Montel committed
471
472
473
474
475
476
    HEADER_NAMES
    MessageViewerSettings
    REQUIRED_HEADERS MessageViewer_settings_HEADERS
    PREFIX MessageViewer
    RELATIVE settings
    )
477
478
479


ecm_generate_headers(MessageViewer_Camelcaseheader_HEADERS
Laurent Montel's avatar
Laurent Montel committed
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
    HEADER_NAMES
    HeaderStrategy
    GrantleeHeaderTestStyle
    GrantleeHeaderStyle
    HeaderStyle
    KXFace
    HeaderStyle_Util
    HeaderStylePlugin
    HeaderStyleInterface
    PlainHeaderStyle
    RichHeaderStrategy
    HeaderStylePluginManager
    HeaderStyleMenuManager
    REQUIRED_HEADERS MessageViewer_header_HEADERS
    PREFIX MessageViewer
    RELATIVE header
    )
497
498

ecm_generate_headers(MessageViewer_Camelcasehtmlwriter_HEADERS
Laurent Montel's avatar
Laurent Montel committed
499
500
501
502
503
504
    HEADER_NAMES
    WebKitPartHtmlWriter
    REQUIRED_HEADERS MessageViewer_htmlwriter_HEADERS
    PREFIX MessageViewer
    RELATIVE htmlwriter
    )
505

Laurent Montel's avatar
Laurent Montel committed
506
ecm_generate_headers(MessageViewer_Camelcaseadblockcommon_HEADERS
Laurent Montel's avatar
Laurent Montel committed
507
508
509
510
511
512
513
    HEADER_NAMES
    AdBlockListWidget
    AdBlockSettingWidget
    REQUIRED_HEADERS MessageViewer_adblockcommon_HEADERS
    PREFIX MessageViewer
    RELATIVE adblock/common
    )
Laurent Montel's avatar
Laurent Montel committed
514
515


516
ecm_generate_headers(MessageViewer_Camelcaseadblock_HEADERS
Laurent Montel's avatar
Laurent Montel committed
517
518
519
520
521
522
523
    HEADER_NAMES
    AdBlockBlockableItemsDialog
    AdBlockManager
    REQUIRED_HEADERS MessageViewer_adblock_HEADERS
    PREFIX MessageViewer
    RELATIVE adblock
    )
524
525

ecm_generate_headers(MessageViewer_Camelcaseviewerplugin_HEADERS
Laurent Montel's avatar
Laurent Montel committed
526
527
528
529
530
531
532
533
534
    HEADER_NAMES
    ViewerPluginManager
    ViewerPlugin
    ViewerPluginInterface
    ViewerPluginToolManager
    REQUIRED_HEADERS MessageViewer_viewerplugin_HEADERS
    PREFIX MessageViewer
    RELATIVE viewerplugins
    )
535
536

ecm_generate_headers(MessageViewer_Camelcaseviewerjob_HEADERS
Laurent Montel's avatar
Laurent Montel committed
537
538
539
540
541
542
543
544
    HEADER_NAMES
    CreateTodoJob
    CreateNoteJob
    CreateEventJob
    REQUIRED_HEADERS MessageViewer_viewerjob_HEADERS
    PREFIX MessageViewer
    RELATIVE job
    )
545
546
547

ecm_generate_pri_file(BASE_NAME MessageViewer
    LIB_NAME KF5MessageViewer
548
    DEPS "PimCommon MessageCore AkonadiCore AkonadiMime Contacts Libkleo MimeTreeParser" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MessageViewer
Laurent Montel's avatar
Laurent Montel committed
549
    )
550

Laurent Montel's avatar
Laurent Montel committed
551

552
install(FILES
Laurent Montel's avatar
Laurent Montel committed
553
    ${MessageViewer_Camelcasewebengine_misc_HEADERS}
554
    ${MessageViewer_Camelcasewebengine_manager_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
555
    ${MessageViewer_Camelcasewebengine_urlinterceptor_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
556
    ${MessageViewer_Camelcasewebengine_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
557
    ${MessageViewer_Camelcasewebengine_accesskey_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
558
    ${MessageViewer_CamelfindbarWebEngine_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
559
    ${MessageViewer_Camelcasewebviewer_HEADERS}
560
561
562
563
564
565
566
567
568
569
570
    ${MessageViewer_Camelcaseheader_HEADERS}
    ${MessageViewer_Camelcaseviewerplugin_HEADERS}
    ${MessageViewer_Camelcasesettings_HEADERS}
    ${MessageViewer_Camelcaseadblock_HEADERS}
    ${MessageViewer_Camelcasehtmlwriter_HEADERS}
    ${MessageViewer_Camelcaseutils_HEADERS}
    ${MessageViewer_Camelcaseinterfaces_HEADERS}
    ${MessageViewer_Camelcaseviewer_HEADERS}
    ${MessageViewer_Camelcasewidgets_HEADERS}
    ${MessageViewer_Camelcaseviewerjob_HEADERS}
    ${MessageViewer_Camelcaseantispam_HEADERS}
571
    ${MessageViewer_Camelfindbar_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
572
    ${MessageViewer_Camelcaseadblockcommon_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
573
    ${MessageViewer_Camelcasescam_HEADERS}
574
575
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MessageViewer
    COMPONENT Devel
Laurent Montel's avatar
Laurent Montel committed
576
    )
577
578

install(FILES
Laurent Montel's avatar
Laurent Montel committed
579
    ${MessageViewer_scam_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
580
    ${MessageViewer_webengine_misc_HEADERS}
581
    ${MessageViewer_webengine_manager_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
582
    ${MessageViewer_webengine_urlinterceptor_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
583
    ${MessageViewer_webengine_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
584
    ${MessageViewer_webengine_accesskey_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
585
    ${MessageViewer_findbarWebEngine_HEADERS}
Raymond Wooninck's avatar
Typo    
Raymond Wooninck committed
586
    ${MessageViewer_adblockcommon_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
587
    ${MessageViewer_webviewer_HEADERS}
588
589
590
591
592
593
594
595
596
597
598
599
    ${MessageViewer_viewerplugin_HEADERS}
    ${MessageViewer_settings_HEADERS}
    ${MessageViewer_adblock_HEADERS}
    ${MessageViewer_htmlwriter_HEADERS}
    ${MessageViewer_header_HEADERS}
    ${MessageViewer_utils_HEADERS}
    ${MessageViewer_interfaces_HEADERS}
    ${MessageViewer_HEADERS}
    ${MessageViewer_viewer_HEADERS}
    ${MessageViewer_widgets_HEADERS}
    ${MessageViewer_viewerjob_HEADERS}
    ${MessageViewer_antispam_HEADERS}
600
    ${MessageViewer_findbar_HEADERS}
601
602
603
    ${CMAKE_CURRENT_BINARY_DIR}/messageviewer_export.h
    ${CMAKE_CURRENT_BINARY_DIR}/globalsettings_messageviewer.h
    ${CMAKE_CURRENT_BINARY_DIR}/messageviewer_debug.h
604
    ${CMAKE_CURRENT_BINARY_DIR}/config-messageviewer.h
605
606
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/messageviewer
    COMPONENT Devel
Laurent Montel's avatar
Laurent Montel committed
607
    )
608
609
610
611
612
613
614
615
616
617

install(FILES
    ${PRI_FILENAME}
    DESTINATION ${ECM_MKSPECS_INSTALL_DIR})


install(FILES header/data/messageviewer_header_themes.knsrc DESTINATION ${KDE_INSTALL_CONFDIR} )

install(FILES notify/messageviewer.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} )
install(FILES scamdetection/data/longurlServices.json DESTINATION ${KDE_INSTALL_DATADIR}/messageviewer )