File: CMakeLists.txt

package info (click to toggle)
kf5-messagelib 4:18.08.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 66,672 kB
  • sloc: cpp: 84,452; xml: 302; sh: 25; makefile: 13
file content (93 lines) | stat: -rw-r--r-- 3,261 bytes parent folder | download
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
add_definitions( -DMAIL_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" )

include( ${CMAKE_SOURCE_DIR}/cmake/modules/kdepim_add_gpg_crypto_test.cmake )

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src/part)

# Convenience macro to add messagecomposer unit tests.
macro( add_messagecomposer_test _source )
    ecm_add_test(${_source}
        NAME_PREFIX "messagecomposer-"
        LINK_LIBRARIES 
            KF5::Mime
            KF5::MessageComposer
            KF5::MessageViewer
            KF5::MessageCore
            KF5::TemplateParser
            KF5::PimTextEdit
            Qt5::Test
            KF5::IdentityManagement
            KF5::Contacts
            KF5::AkonadiCore
            KF5::XmlGui
            KF5::Libkdepim
            KF5::IconThemes
            KF5::Completion
    )
endmacro()

macro( add_messagecomposer_cryptotest _source )
    set( _test cryptofunctions.cpp setupenv.cpp ${_source} )
    get_filename_component( _name ${_source} NAME_WE )
    add_executable( ${_name} ${_test} )
    target_link_libraries(
        ${_name}
        KF5::Mime
        KF5::MessageComposer
        KF5::MessageViewer
        KF5::MessageCore
        KF5::Libkleo
        KF5::Libkdepim
        KF5::PimTextEdit
        KF5::AkonadiCore
        Qt5::Test
        QGpgme
        KF5::IconThemes
        KF5::Completion
        KF5::MailTransport
        KF5::Ldap
        KF5::Contacts
    )
    add_gpg_crypto_test(${_name} messagecomposer-${_name})
    set_tests_properties(messagecomposer-${_name} PROPERTIES RUN_SERIAL TRUE) # can't be parallelized due to gpg-agent
endmacro()


# Utility stuff.
add_messagecomposer_test( utiltest.cpp )
add_messagecomposer_test( messagefactoryngtest.cpp )
add_messagecomposer_test( plugineditorcheckbeforesendparamstest.cpp )

# Non-content jobs.
add_messagecomposer_test( skeletonmessagejobtest.cpp )

# Basic content jobs.
add_messagecomposer_test( singlepartjobtest.cpp )
add_messagecomposer_test( multipartjobtest.cpp )

# More complex content jobs.
add_messagecomposer_test( attachmentjobtest.cpp )
add_messagecomposer_test( maintextjobtest.cpp )

# Composer.
add_messagecomposer_test( composertest.cpp )
add_messagecomposer_cryptotest( cryptocomposertest.cpp )
add_messagecomposer_test( infoparttest.cpp )
add_messagecomposer_test( textparttest.cpp )
add_messagecomposer_test( globalparttest.cpp )
add_messagecomposer_test( composerviewbasetest.cpp )

add_messagecomposer_test( recipientseditortest.cpp )

# Crypto
add_messagecomposer_cryptotest( signjobtest.cpp )
add_messagecomposer_cryptotest( encryptjobtest.cpp )
add_messagecomposer_cryptotest( signencrypttest.cpp )

set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE)
set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE)

add_akonadi_isolated_test_advanced( followupreminderselectdatedialogtest.cpp  "../src/followupreminder/followupreminderselectdatedialog.cpp" "KF5::CalendarCore;KF5::AkonadiCore;KF5::AkonadiWidgets;KF5::MessageComposer;KF5::I18n")

add_akonadi_isolated_test_advanced( attachmentvcardfromaddressbookjobtest.cpp "../src/job/attachmentvcardfromaddressbookjob.cpp" "KF5::CalendarCore;KF5::AkonadiCore;KF5::AkonadiWidgets;KF5::MessageComposer;KF5::Contacts;KF5::AkonadiContact;KF5::I18n")