CMakeLists.txt 4.15 KB
Newer Older
Sandro Knauß's avatar
Sandro Knauß committed
1
2
3
4
5
6
7

add_definitions(-DTRANSLATION_DOMAIN=\"libmimetreeparser\")

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

set(libmimetreeparser_main_SRCS
8
    bodyformatter/applicationpgpencrypted.cpp
9
    bodyformatter/applicationpkcs7mime.cpp
Sandro Knauß's avatar
Sandro Knauß committed
10
    bodyformatter/encrypted.cpp
11
    bodyformatter/mailman.cpp
12
13
14
15
16
17
    bodyformatter/multipartalternative.cpp
    bodyformatter/multipartencrypted.cpp
    bodyformatter/multipartmixed.cpp
    bodyformatter/multipartsigned.cpp
    bodyformatter/textplain.cpp
    bodyformatter/texthtml.cpp
Sandro Knauß's avatar
Sandro Knauß committed
18
    bodyformatter/utils.cpp
Sandro Knauß's avatar
Sandro Knauß committed
19
    interfaces/bodypartformatter.cpp
20
    interfaces/objecttreesource.cpp
21
    interfaces/bodypart.cpp
22
    job/qgpgmejobexecutor.cpp
23
    utils/util.cpp
24
25
26
27
28
29
30
    bodypartformatter.cpp
    bodypartformatterfactory.cpp
    cryptohelper.cpp
    nodehelper.cpp
    objecttreeparser.cpp
    messagepart.cpp
    partnodebodypart.cpp
31
    simpleobjecttreesource.cpp
32
33
34
35
    memento/cryptobodypartmemento.cpp
    memento/decryptverifybodypartmemento.cpp
    memento/verifydetachedbodypartmemento.cpp
    memento/verifyopaquebodypartmemento.cpp
Sandro Knauß's avatar
Sandro Knauß committed
36
37
    )

38
39
40
set(mimetreeparser_temporaryfile_SRCS
    temporaryfile/attachmenttemporaryfilesdirs.cpp
    )
Sandro Knauß's avatar
Sandro Knauß committed
41

42
ecm_generate_headers(MimeTreeParser_Camelcasemain_HEADERS
Sandro Knauß's avatar
Sandro Knauß committed
43
    HEADER_NAMES
44
    BodyPartFormatterFactory
Sandro Knauß's avatar
Sandro Knauß committed
45
46
47
48
49
50
    Enums
    MessagePart
    NodeHelper
    ObjectTreeParser
    PartMetaData
    PartNodeBodyPart
51
    SimpleObjectTreeSource
52
    REQUIRED_HEADERS MimeTreeParser_main_HEADERS
Sandro Knauß's avatar
Sandro Knauß committed
53
54
55
56
57
    PREFIX MimeTreeParser
    )

ecm_generate_headers(MimeTreeParser_Camelcaseutils_HEADERS
    HEADER_NAMES
Sandro Knauß's avatar
Sandro Knauß committed
58
    Util
Sandro Knauß's avatar
Sandro Knauß committed
59
60
61
62
63
64
65
66
67
    REQUIRED_HEADERS MimeTreeParser_utils_HEADERS
    PREFIX MimeTreeParser
    RELATIVE utils
    )

ecm_generate_headers(MimeTreeParser_Camelcaseinterfaces_HEADERS
    HEADER_NAMES
    BodyPartFormatter
    BodyPart
68
    ObjectTreeSource
Sandro Knauß's avatar
Sandro Knauß committed
69
70
71
72
73
    REQUIRED_HEADERS MimeTreeParser_interfaces_HEADERS
    PREFIX MimeTreeParser
    RELATIVE interfaces
    )

74
75
76
77
78
79
80
81
ecm_generate_headers(MimeTreeParser_Camelcasetemporaryfile_HEADERS
    HEADER_NAMES
    AttachmentTemporaryFilesDirs
    REQUIRED_HEADERS MimeTreeParser_temporaryfile_HEADERS
    PREFIX MimeTreeParser
    RELATIVE temporaryfile
    )

Sandro Knauß's avatar
Sandro Knauß committed
82
83
84
install(FILES
    ${MimeTreeParser_Camelcaseutils_HEADERS}
    ${MimeTreeParser_Camelcaseinterfaces_HEADERS}
85
    ${MimeTreeParser_Camelcasemain_HEADERS}
86
    ${MimeTreeParser_Camelcasetemporaryfile_HEADERS}
Sandro Knauß's avatar
Sandro Knauß committed
87
88
89
90
91
92
93
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MimeTreeParser
    COMPONENT Devel
    )

install(FILES
    ${MimeTreeParser_utils_HEADERS}
    ${MimeTreeParser_interfaces_HEADERS}
94
    ${MimeTreeParser_main_HEADERS}
95
    ${MimeTreeParser_temporaryfile_HEADERS}
Sandro Knauß's avatar
Sandro Knauß committed
96
97
98
99
100
101
102
103
104
105
106
107
108
109
    ${CMAKE_CURRENT_BINARY_DIR}/mimetreeparser_export.h

    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/mimetreeparser
    COMPONENT Devel
    )

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

set(libmimetreeparser_SRCS
    ${libmimetreeparser_main_SRCS}
    ${libmimetreeparser_extra_SRCS}
110
    ${mimetreeparser_temporaryfile_SRCS}
Sandro Knauß's avatar
Sandro Knauß committed
111
112
    )

Laurent Montel's avatar
Laurent Montel committed
113
ecm_qt_declare_logging_category(libmimetreeparser_SRCS HEADER mimetreeparser_debug.h IDENTIFIER MIMETREEPARSER_LOG CATEGORY_NAME org.kde.pim.mimetreeparser)
Sandro Knauß's avatar
Sandro Knauß committed
114
115
116
117
118
119
120
121

add_library(KF5MimeTreeParser
    ${libmimetreeparser_SRCS}
    )

generate_export_header(KF5MimeTreeParser BASE_NAME mimetreeparser)
add_library(KF5::MimeTreeParser ALIAS KF5MimeTreeParser)

122
set(mimetreeparser_LINK_LIBRARIES
123
124
125
126
   )

target_link_libraries(KF5MimeTreeParser
    PRIVATE
127
    QGpgme
128
129
    KF5::Codecs
    KF5::I18n
130
    KF5::CoreAddons
Sandro Knauß's avatar
Sandro Knauß committed
131
    KF5::Mime
132
    Qt5::Gui
Sandro Knauß's avatar
Sandro Knauß committed
133
134
135
136
137
138
139
140
141
142
143
144
145
146
    )

install(TARGETS
    KF5MimeTreeParser
    EXPORT KF5MimeTreeParserTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
    )

set_target_properties(KF5MimeTreeParser PROPERTIES
    VERSION ${MIMETREEPARSER_VERSION_STRING}
    SOVERSION ${MIMETREEPARSER_SOVERSION}
    EXPORT_NAME MimeTreeParser
    )

target_include_directories(KF5MimeTreeParser INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MimeTreeParser/;${KDE_INSTALL_INCLUDEDIR_KF5}/mimetreeparser>")
147

Nicolas Fella's avatar
Nicolas Fella committed
148
149
150
151
152
ecm_generate_pri_file(BASE_NAME MimeTreeParser
    LIB_NAME KF5MimeTreeParser
    FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MimeTreeParser
    )