CMakeLists.txt 17.9 KB
Newer Older
1 2
add_definitions(-DTRANSLATION_DOMAIN=\"libmessageviewer\")

3 4
add_subdirectory(messagepartthemes/grantlee)

5 6 7 8
# 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
9 10 11
    set(LEGACY_MANGLE_FROM_TO_HEADERS true)
    set(LEGACY_BODY_INVITES true)
    set(EXCHANGE_COMPATIBLE_INVITATIONS true)
12
else()
Laurent Montel's avatar
Laurent Montel committed
13 14 15
    set(LEGACY_MANGLE_FROM_TO_HEADERS false)
    set(LEGACY_BODY_INVITES false)
    set(EXCHANGE_COMPATIBLE_INVITATIONS false)
16 17 18 19
endif()

configure_file(settings/messageviewer.kcfg.cmake ${CMAKE_CURRENT_BINARY_DIR}/messageviewer.kcfg)
include(CheckIncludeFiles)
Tobias C. Berner's avatar
Tobias C. Berner committed
20 21 22
find_package(Inotify)
set_package_properties(Inotify PROPERTIES
                       PURPOSE "Filesystem alteration notifications using inotify")
23 24 25 26 27
if(Inotify_FOUND)
    set(HAVE_SYS_INOTIFY_H 1)
else()
    set(HAVE_SYS_INOTIFY_H 0)
endif()
Laurent Montel's avatar
Laurent Montel committed
28

29
find_package(Qca-qt5 2.1.0 CONFIG REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
30
set_package_properties(Qca-qt5 PROPERTIES DESCRIPTION "Qt Cryptographic Architecture"
31
                   URL "https:/download.kde.org/stable/qca-qt5" TYPE REQUIRED
Laurent Montel's avatar
Laurent Montel committed
32
                   PURPOSE "Needed for dkim support.")
Laurent Montel's avatar
Laurent Montel committed
33 34 35 36 37

if (${Qca-qt5_FOUND})
    set(USE_DKIM_CHECKER 1)
endif()

38 39 40 41 42 43
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)
44
    add_subdirectory(header/autotests)
Laurent Montel's avatar
Laurent Montel committed
45 46 47
    add_subdirectory(scamdetection/autotests)
    add_subdirectory(scamdetection/tests)
    add_subdirectory(viewerplugins/tests/)
48
    add_subdirectory(htmlwriter/autotests)
Laurent Montel's avatar
Laurent Montel committed
49
    add_subdirectory(viewer/webengine/tests)
50
    add_subdirectory(messagepartthemes/default/autotests)
Laurent Montel's avatar
Laurent Montel committed
51
    add_subdirectory(widgets/autotests/)
52
    add_subdirectory(utils/autotests)
53
    add_subdirectory(viewer/renderer/autotests)
54 55 56 57
endif()
add_subdirectory(pics)
add_subdirectory(kconf_update)
add_subdirectory(about)
58
add_subdirectory(messageviewerheaderplugins)
59

60
if (${Qca-qt5_FOUND})
61 62
    if (BUILD_TESTING)
        add_subdirectory(dkim-verify/autotests)
63
	add_subdirectory(dkim-verify/tests)
64
    endif()
Laurent Montel's avatar
Laurent Montel committed
65 66 67 68 69
    set(dkim_verify_SRCS
        dkim-verify/dkiminfo.cpp
        dkim-verify/dkimmanagerkey.cpp
        dkim-verify/dkimmanagerkeywidget.cpp
        dkim-verify/dkimmanagerkeydialog.cpp
Laurent Montel's avatar
Laurent Montel committed
70
        dkim-verify/dkimdownloadkeyjob.cpp
71
        dkim-verify/dkimchecksignaturejob.cpp
Laurent Montel's avatar
Laurent Montel committed
72 73
        dkim-verify/dkimcheckauthenticationstatusjob.cpp
        dkim-verify/dkimauthenticationstatusinfo.cpp
Laurent Montel's avatar
Laurent Montel committed
74
        dkim-verify/dkimutil.cpp
75
        dkim-verify/dkimkeyrecord.cpp
Laurent Montel's avatar
Laurent Montel committed
76
        dkim-verify/dkimmanager.cpp
Laurent Montel's avatar
Laurent Montel committed
77
        dkim-verify/dkimresultattribute.cpp
Laurent Montel's avatar
Laurent Montel committed
78
        dkim-verify/dkimwidgetinfo.cpp
Laurent Montel's avatar
Laurent Montel committed
79
        dkim-verify/dkimstoreresultjob.cpp
80
        dkim-verify/dkimheaderparser.cpp
81
        dkim-verify/dkimcheckpolicy.cpp
82
        dkim-verify/dmarcrecordjob.cpp
Laurent Montel's avatar
Laurent Montel committed
83
        dkim-verify/dmarcinfo.cpp
84
        dkim-verify/dmarcpolicyjob.cpp
Laurent Montel's avatar
Laurent Montel committed
85
        dkim-verify/dkimcheckpolicyjob.cpp
Laurent Montel's avatar
Laurent Montel committed
86
        dkim-verify/dkimrule.cpp
87
        dkim-verify/dkimmanagerrules.cpp
88
        dkim-verify/dkimgeneraterulejob.cpp
Laurent Montel's avatar
Laurent Montel committed
89
        dkim-verify/dkimauthenticationstatusinfoutil.cpp
90
	dkim-verify/dkimcheckfulljob.cpp
Laurent Montel's avatar
Laurent Montel committed
91
        dkim-verify/dkimauthenticationstatusinfoconverter.cpp
92
        dkim-verify/dkimmanagerauthenticationserver.cpp
Laurent Montel's avatar
Laurent Montel committed
93
        dkim-verify/dkimviewermenu.cpp
Laurent Montel's avatar
Laurent Montel committed
94
        )
95 96
endif()

97 98 99 100
set(messageviewer_renderer_SRCS
    viewer/renderer/messageviewerrenderer.cpp
    )

101
if(DEBUG_SIGNATURE)
Laurent Montel's avatar
Laurent Montel committed
102
    add_definitions(-DDEBUG_SIGNATURE)
103
endif()
Laurent Montel's avatar
Laurent Montel committed
104 105 106 107 108 109 110 111 112
if (MESSAGEVIEWER_EXPERIMENTAL_CONVERSATIONVIEW)
    set(libmessageviewer_conversationviewer_SRCS
        conversationview/conversationviewwidget.cpp
        )
    if (BUILD_TESTING)
        add_subdirectory(conversationview/autotests)
        add_subdirectory(conversationview/tests)
    endif()
endif()
113

Laurent Montel's avatar
Laurent Montel committed
114 115 116 117 118
set(libmessageviewer_mailviewer_SRCS
    viewer/webengine/mailwebengineview.cpp
    viewer/webengine/mailwebenginepage.cpp
    viewer/webengine/loadexternalreferencesurlinterceptor/loadexternalreferencesurlinterceptor.cpp
    viewer/webengine/cidreferencesurlinterceptor/cidreferencesurlinterceptor.cpp
Laurent Montel's avatar
Laurent Montel committed
119
    viewer/webengine/blockexternalresourcesurlinterceptor/blockexternalresourcesurlinterceptor.cpp
120
    viewer/webengine/blockmailtrackingurlinterceptor/blockmailtrackingurlinterceptor.cpp
Laurent Montel's avatar
Laurent Montel committed
121
    )
Laurent Montel's avatar
Laurent Montel committed
122

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

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

Laurent Montel's avatar
Laurent Montel committed
153

Laurent Montel's avatar
Laurent Montel committed
154 155 156
set(libmessageviewer_widgets_webengine_SRCS
    widgets/mailsourcewebengineviewer.cpp
    )
157

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

Laurent Montel's avatar
Laurent Montel committed
184 185 186
set(libmessageviewer_scamdetection_webengine_SRCS
    scamdetection/scamdetectionwebengine.cpp
    )
187

188
set(libmessageviewer_findbar_SRCS
Laurent Montel's avatar
Laurent Montel committed
189 190
    findbar/findbarsourceview.cpp
    )
191 192

set(libmessageviewer_utils_SRCS
193
    utils/iconnamecache.cpp
Laurent Montel's avatar
Laurent Montel committed
194 195
    utils/markmessagereadhandler.cpp
    utils/messageviewerutil.cpp
Sandro Knauß's avatar
Sandro Knauß committed
196
    utils/mimetype.cpp
Laurent Montel's avatar
Laurent Montel committed
197
    )
198

199
set(libmessageviewer_htmlwriter_SRCS
Laurent Montel's avatar
Laurent Montel committed
200 201
    htmlwriter/webengineparthtmlwriter.cpp
    htmlwriter/webengineembedpart.cpp
202 203 204 205
    htmlwriter/bufferedhtmlwriter.cpp
    htmlwriter/filehtmlwriter.cpp
    )

206
set(libmessageviewer_antispam_SRCS
Laurent Montel's avatar
Laurent Montel committed
207 208 209
    antispam/spamheaderanalyzer.cpp
    antispam/antispamconfig.cpp
    )
210 211

set(libmessageviewer_job_SRCS
Laurent Montel's avatar
Laurent Montel committed
212 213
    job/modifymessagedisplayformatjob.cpp
    )
214 215

set(libmessageviewer_viewerplugins_SRCS
Laurent Montel's avatar
Laurent Montel committed
216 217 218 219 220
    viewerplugins/viewerpluginmanager.cpp
    viewerplugins/viewerplugin.cpp
    viewerplugins/viewerplugininterface.cpp
    viewerplugins/viewerplugintoolmanager.cpp
    )
221

Laurent Montel's avatar
Laurent Montel committed
222 223
set(libmessageviewer_configureplugins_SRCS
    messageviewerconfigureplugins/messageviewerconfiguresettingsplugin.cpp
Laurent Montel's avatar
Laurent Montel committed
224
    messageviewerconfigureplugins/messageviewerconfiguresettingspluginmanager.cpp
Laurent Montel's avatar
Laurent Montel committed
225
    messageviewerconfigureplugins/messageviewerconfiguresettingspluginwidget.cpp
Laurent Montel's avatar
Laurent Montel committed
226 227
    )

228 229 230 231
set(libmessageviewer_messagepartthemes_default_SRCS
    messagepartthemes/default/converthtmltoplaintext.cpp
    messagepartthemes/default/defaultrenderer.cpp
    messagepartthemes/default/htmlblock.cpp
232
    messagepartthemes/default/messagepartrenderermanager.cpp
233
    messagepartthemes/default/plugins/attachmentmessagepartrenderer.cpp
234
    messagepartthemes/default/plugins/messagepartrenderer.cpp
Sandro Knauß's avatar
Sandro Knauß committed
235
    messagepartthemes/default/plugins/textmessagepartrenderer.cpp
Sandro Knauß's avatar
Sandro Knauß committed
236
    messagepartthemes/default/plugins/quotehtml.cpp
237
    messagepartthemes/default/messagepartrenderbase.cpp
Volker Krause's avatar
Volker Krause committed
238
    messagepartthemes/default/messagepartrenderplugin.cpp
239
    messagepartthemes/default/messagepartrendererfactory.cpp
240 241
    )

242 243 244 245
set(libmessageviewer_interfaces_SRCS
    interfaces/htmlwriter.cpp
    )

246
set(libmessageviewer_SRCS
247
    ${messageviewer_renderer_SRCS}
248
    ${libmessageviewer_conversationviewer_SRCS}
Laurent Montel's avatar
Laurent Montel committed
249
    ${dkim_verify_SRCS}
Laurent Montel's avatar
Laurent Montel committed
250
    ${libmessageviewer_messagepartthemes_default_SRCS}
251
    ${libmessageviewer_htmlwriter_SRCS}
252
    ${libmessageviewer_messagepartthemes_SRCS}
253
    ${libmessageviewer_scamdetection_webengine_SRCS}
254
    ${libmessageviewer_widgets_webengine_SRCS}
Laurent Montel's avatar
Laurent Montel committed
255 256 257 258 259 260 261 262 263 264 265
    ${libmessageviewer_viewer_SRCS}
    ${libmessageviewer_widgets_SRCS}
    ${libmessageviewer_header_SRCS}
    ${libmessageviewer_scamdetection_SRCS}
    ${libmessageviewer_findbar_SRCS}
    ${libmessageviewer_utils_SRCS}
    ${libmessageviewer_antispam_SRCS}
    ${libmessageviewer_job_SRCS}
    ${libmessageviewer_viewerplugins_SRCS}
    settings/messageviewersettings.cpp
    ${libmessageviewer_mailviewer_SRCS}
266
    ${libmessageviewer_interfaces_SRCS}
Laurent Montel's avatar
Laurent Montel committed
267
    ${libmessageviewer_configureplugins_SRCS}
Laurent Montel's avatar
Laurent Montel committed
268
    )
269

270 271
qt5_add_resources(libmessageviewer_SRCS messagepartthemes.qrc)

Laurent Montel's avatar
Laurent Montel committed
272
ecm_qt_declare_logging_category(libmessageviewer_SRCS HEADER messageviewer_debug.h IDENTIFIER MESSAGEVIEWER_LOG CATEGORY_NAME org.kde.pim.messageviewer)
Laurent Montel's avatar
Laurent Montel committed
273
ecm_qt_declare_logging_category(libmessageviewer_SRCS HEADER messageviewer_dkimcheckerdebug.h IDENTIFIER MESSAGEVIEWER_DKIMCHECKER_LOG CATEGORY_NAME org.kde.pim.messageviewer_dkimchecker)
274
kconfig_add_kcfg_files(libmessageviewer_SRCS
Laurent Montel's avatar
Laurent Montel committed
275 276
    settings/globalsettings_messageviewer.kcfgc
    )
277 278

ki18n_wrap_ui(libmessageviewer_SRCS
Laurent Montel's avatar
Laurent Montel committed
279 280 281 282
    ui/settings.ui
    ui/invitationsettings.ui
    ui/printingsettings.ui
    )
283 284 285 286 287 288


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

289
target_include_directories(KF5MessageViewer INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MessageViewer/;${KDE_INSTALL_INCLUDEDIR_KF5}/messageviewer>;${Inotify_INCLUDE_DIRS}")
290

291
if (${Qca-qt5_FOUND})
292 293 294
    set(OPTIONAL_PRIVATE qca-qt5)
endif()

295
target_link_libraries(KF5MessageViewer
Laurent Montel's avatar
Laurent Montel committed
296 297 298 299 300 301 302
    PUBLIC
    KF5::MessageCore
    KF5::PimCommon
    KF5::AkonadiCore
    KF5::AkonadiMime
    KF5::Contacts
    KF5::Libkleo
303
    KF5::MimeTreeParser
Laurent Montel's avatar
Laurent Montel committed
304
    PRIVATE
305
    KF5::SyntaxHighlighting
Laurent Montel's avatar
Laurent Montel committed
306
    KF5::ItemViews
Sandro Knauß's avatar
Sandro Knauß committed
307
    Qt5::Network
Laurent Montel's avatar
Laurent Montel committed
308
    KF5::WebEngineViewer
Laurent Montel's avatar
Laurent Montel committed
309
    KF5::LibkdepimAkonadi
Laurent Montel's avatar
Laurent Montel committed
310 311
    KF5::GrantleeTheme
    KF5::KaddressbookGrantlee
Laurent Montel's avatar
Laurent Montel committed
312
    KF5::MailTransportAkonadi
Laurent Montel's avatar
Laurent Montel committed
313 314 315 316 317
    KF5::Mime
    KF5::Mbox
    KF5::PimTextEdit
    KF5::Gravatar
    KF5::IconThemes
318 319 320 321
    KF5::I18n
    KF5::KIOFileWidgets
    KF5::KIOWidgets
    KF5::XmlGui
322 323
    Grantlee5::TextDocument
    Grantlee5::Templates
324
    Qt5::PrintSupport
325
    QGpgme
326
    ${Inotify_LIBRARIES}
327
    ${OPTIONAL_PRIVATE}
Laurent Montel's avatar
Laurent Montel committed
328
    )
329

330 331 332 333
set_target_properties(KF5MessageViewer PROPERTIES
    VERSION ${MESSAGEVIEWER_VERSION_STRING}
    SOVERSION ${MESSAGEVIEWER_SOVERSION}
    EXPORT_NAME MessageViewer
Laurent Montel's avatar
Laurent Montel committed
334
    )
335 336 337 338

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

Laurent Montel's avatar
Laurent Montel committed
341 342 343 344 345 346 347 348 349
ecm_generate_headers(MessageViewer_Camelblockmailtrackingurlinterceptor_HEADERS
    HEADER_NAMES
    BlockMailTrackingUrlInterceptor

    REQUIRED_HEADERS MessageViewer_blockmailtrackingurlinterceptor_HEADERS
    PREFIX MessageViewer
    RELATIVE viewer/webengine/blockmailtrackingurlinterceptor
    )

Laurent Montel's avatar
Laurent Montel committed
350 351 352 353
ecm_generate_headers(MessageViewer_Camelcasewebengine_HEADERS
    HEADER_NAMES
    MailWebEnginePage
    MailWebEngineView
354

Laurent Montel's avatar
Laurent Montel committed
355 356 357 358
    REQUIRED_HEADERS MessageViewer_webengine_HEADERS
    PREFIX MessageViewer
    RELATIVE viewer/webengine
    )
Laurent Montel's avatar
Laurent Montel committed
359

Laurent Montel's avatar
Laurent Montel committed
360 361 362
ecm_generate_headers(MessageViewer_Camelcasescam_HEADERS
    HEADER_NAMES
    ScamExpandUrlJob
Laurent Montel's avatar
Laurent Montel committed
363
    ScamCheckShortUrlManager
Laurent Montel's avatar
Laurent Montel committed
364
    ScamCheckShortUrl
Laurent Montel's avatar
Laurent Montel committed
365 366 367 368
    REQUIRED_HEADERS MessageViewer_scam_HEADERS
    PREFIX MessageViewer
    RELATIVE scamdetection
    )
Laurent Montel's avatar
Laurent Montel committed
369

370
if (${Qca-qt5_FOUND})
Laurent Montel's avatar
Laurent Montel committed
371 372 373 374 375
    ecm_generate_headers(MessageViewer_Cameldkimverify_HEADERS
        HEADER_NAMES
        DKIMManagerKey
        DKIMCheckSignatureJob
        DKIMManager
Laurent Montel's avatar
Laurent Montel committed
376 377
        DKIMManagerKeyWidget
        DKIMManagerKeyDialog
Laurent Montel's avatar
Laurent Montel committed
378
        DKIMKeyRecord
Laurent Montel's avatar
Laurent Montel committed
379
        DKIMInfo
Laurent Montel's avatar
Laurent Montel committed
380
        DKIMWidgetInfo
Laurent Montel's avatar
Laurent Montel committed
381
        DKIMCheckPolicy
382 383
        DKIMManagerRules
        DKIMRule
384
        DKIMHeaderParser
385
        DKIMManagerAuthenticationServer
Laurent Montel's avatar
Laurent Montel committed
386 387 388 389
        REQUIRED_HEADERS MessageViewer_dkimverify_HEADERS
        PREFIX MessageViewer
        RELATIVE dkim-verify
        )
Laurent Montel's avatar
Laurent Montel committed
390
endif()
Laurent Montel's avatar
Laurent Montel committed
391 392


393
ecm_generate_headers(MessageViewer_Camelcaseviewer_HEADERS
Laurent Montel's avatar
Laurent Montel committed
394
    HEADER_NAMES
395
    AttachmentStrategy
Laurent Montel's avatar
Laurent Montel committed
396
    Viewer
397
    CSSHelperBase
Laurent Montel's avatar
Laurent Montel committed
398 399 400 401 402 403 404 405
    CSSHelper
    ObjectTreeEmptySource
    EditorWatcher
    Stl_Util
    REQUIRED_HEADERS MessageViewer_viewer_HEADERS
    PREFIX MessageViewer
    RELATIVE viewer
    )
406 407

ecm_generate_headers(MessageViewer_Camelcasewidgets_HEADERS
Laurent Montel's avatar
Laurent Montel committed
408 409 410 411 412 413 414 415
    HEADER_NAMES
    InvitationSettings
    PrintingSettings
    ConfigureWidget
    REQUIRED_HEADERS MessageViewer_widgets_HEADERS
    PREFIX MessageViewer
    RELATIVE widgets
    )
416 417

ecm_generate_headers(MessageViewer_Camelcaseutils_HEADERS
Laurent Montel's avatar
Laurent Montel committed
418
    HEADER_NAMES
419
    IconNameCache
Laurent Montel's avatar
Laurent Montel committed
420
    MarkMessageReadHandler
Sandro Knauß's avatar
Sandro Knauß committed
421 422
    MessageViewerUtil
    MimeType
Laurent Montel's avatar
Laurent Montel committed
423 424 425 426
    REQUIRED_HEADERS MessageViewer_utils_HEADERS
    PREFIX MessageViewer
    RELATIVE utils
    )
427 428

ecm_generate_headers(MessageViewer_Camelcaseantispam_HEADERS
Laurent Montel's avatar
Laurent Montel committed
429 430 431 432 433 434
    HEADER_NAMES
    SpamHeaderAnalyzer
    REQUIRED_HEADERS MessageViewer_antispam_HEADERS
    PREFIX MessageViewer
    RELATIVE antispam
    )
435 436

ecm_generate_headers(MessageViewer_Camelcaseinterfaces_HEADERS
Laurent Montel's avatar
Laurent Montel committed
437
    HEADER_NAMES
438
    HtmlWriter
Laurent Montel's avatar
Laurent Montel committed
439 440 441 442 443 444
    BodyPartURLHandler
    URLHandler
    REQUIRED_HEADERS MessageViewer_interfaces_HEADERS
    PREFIX MessageViewer
    RELATIVE interfaces
    )
445

446 447 448 449 450 451 452 453 454
ecm_generate_headers(MessageViewer_Camelcasehtmlwriter_HEADERS
    HEADER_NAMES
    BufferedHtmlWriter
    FileHtmlWriter
    REQUIRED_HEADERS MessageViewer_htmlwriter_HEADERS
    PREFIX MessageViewer
    RELATIVE htmlwriter
    )

455
ecm_generate_headers(MessageViewer_Camelcasesettings_HEADERS
Laurent Montel's avatar
Laurent Montel committed
456 457 458 459 460 461
    HEADER_NAMES
    MessageViewerSettings
    REQUIRED_HEADERS MessageViewer_settings_HEADERS
    PREFIX MessageViewer
    RELATIVE settings
    )
462

Laurent Montel's avatar
Laurent Montel committed
463 464 465 466
ecm_generate_headers(MessageViewer_CamelcaseConfigurePlugins_HEADERS
    HEADER_NAMES
    MessageViewerConfigureSettingsPluginManager
    MessageViewerConfigureSettingsPlugin
Laurent Montel's avatar
Laurent Montel committed
467
    MessageViewerConfigureSettingsPluginWidget
Laurent Montel's avatar
Laurent Montel committed
468 469 470 471 472
    REQUIRED_HEADERS MessageViewer_ConfigurePlugins_HEADERS
    PREFIX MessageViewer
    RELATIVE messageviewerconfigureplugins
    )

473 474

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

ecm_generate_headers(MessageViewer_Camelcaseviewerplugin_HEADERS
Laurent Montel's avatar
Laurent Montel committed
494 495 496 497 498 499 500 501 502
    HEADER_NAMES
    ViewerPluginManager
    ViewerPlugin
    ViewerPluginInterface
    ViewerPluginToolManager
    REQUIRED_HEADERS MessageViewer_viewerplugin_HEADERS
    PREFIX MessageViewer
    RELATIVE viewerplugins
    )
503

Volker Krause's avatar
Volker Krause committed
504 505 506 507
ecm_generate_headers(MessageViewer_Camelcaserenderer_HEADERS
    HEADER_NAMES
    HtmlBlock
    MessagePartRendererBase
508
    MessagePartRendererManager
Volker Krause's avatar
Volker Krause committed
509 510 511 512 513 514
    MessagePartRenderPlugin
    REQUIRED_HEADERS MessageViewer_renderer_HEADERS
    PREFIX MessageViewer
    RELATIVE messagepartthemes/default
    )

515 516
ecm_generate_pri_file(BASE_NAME MessageViewer
    LIB_NAME KF5MessageViewer
517
    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
518
    )
519
if (${Qca-qt5_FOUND})
Laurent Montel's avatar
Laurent Montel committed
520 521 522 523 524 525 526 527 528 529 530 531
    install(FILES
        ${MessageViewer_Cameldkimverify_HEADERS}
        DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MessageViewer
        COMPONENT Devel
        )

    install(FILES
        ${MessageViewer_dkimverify_HEADERS}
        DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/messageviewer
        COMPONENT Devel
        )
endif()
532

Laurent Montel's avatar
Laurent Montel committed
533

534
install(FILES
Laurent Montel's avatar
Laurent Montel committed
535
    ${MessageViewer_CamelcaseConfigurePlugins_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
536
    ${MessageViewer_Camelcasewebengine_HEADERS}
537 538 539 540 541
    ${MessageViewer_Camelcaseheader_HEADERS}
    ${MessageViewer_Camelcaseviewerplugin_HEADERS}
    ${MessageViewer_Camelcasesettings_HEADERS}
    ${MessageViewer_Camelcaseutils_HEADERS}
    ${MessageViewer_Camelcaseinterfaces_HEADERS}
542
    ${MessageViewer_Camelcasehtmlwriter_HEADERS}
543 544 545
    ${MessageViewer_Camelcaseviewer_HEADERS}
    ${MessageViewer_Camelcasewidgets_HEADERS}
    ${MessageViewer_Camelcaseantispam_HEADERS}
546
    ${MessageViewer_Camelfindbar_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
547
    ${MessageViewer_Camelcasescam_HEADERS}
Volker Krause's avatar
Volker Krause committed
548
    ${MessageViewer_Camelcaserenderer_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
549
    ${MessageViewer_Camelblockmailtrackingurlinterceptor_HEADERS}
550 551
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MessageViewer
    COMPONENT Devel
Laurent Montel's avatar
Laurent Montel committed
552
    )
553 554

install(FILES
Laurent Montel's avatar
Laurent Montel committed
555
    ${MessageViewer_ConfigurePlugins_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
556
    ${MessageViewer_webengine_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
557
    ${MessageViewer_scam_HEADERS}
558 559 560 561 562
    ${MessageViewer_viewerplugin_HEADERS}
    ${MessageViewer_settings_HEADERS}
    ${MessageViewer_header_HEADERS}
    ${MessageViewer_utils_HEADERS}
    ${MessageViewer_interfaces_HEADERS}
563
    ${MessageViewer_htmlwriter_HEADERS}
564 565 566 567
    ${MessageViewer_HEADERS}
    ${MessageViewer_viewer_HEADERS}
    ${MessageViewer_widgets_HEADERS}
    ${MessageViewer_antispam_HEADERS}
568
    ${MessageViewer_findbar_HEADERS}
Volker Krause's avatar
Volker Krause committed
569
    ${MessageViewer_renderer_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
570
    ${MessageViewer_blockmailtrackingurlinterceptor_HEADERS}
571 572 573
    ${CMAKE_CURRENT_BINARY_DIR}/messageviewer_export.h
    ${CMAKE_CURRENT_BINARY_DIR}/globalsettings_messageviewer.h
    ${CMAKE_CURRENT_BINARY_DIR}/messageviewer_debug.h
574
    ${CMAKE_CURRENT_BINARY_DIR}/config-messageviewer.h
575 576
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/messageviewer
    COMPONENT Devel
Laurent Montel's avatar
Laurent Montel committed
577
    )
578 579 580 581 582 583

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


584
install(FILES header/data/messageviewer_header_themes.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR} )
585 586 587

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