CMakeLists.txt 4.6 KB
Newer Older
1
2
3
4
5
add_definitions(-DTRANSLATION_DOMAIN=\"libmessagecore\")

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

set(messagecore_attachment_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
6
7
8
9
10
11
12
13
14
15
16
    attachment/attachmentcompressjob.cpp
    attachment/attachmentfromfolderjob.cpp
    attachment/attachmentfrommimecontentjob.cpp
    attachment/attachmentfromurlbasejob.cpp
    attachment/attachmentfromurljob.cpp
    attachment/attachmentloadjob.cpp
    attachment/attachmentpart.cpp
    attachment/attachmentpropertiesdialog.cpp
    attachment/attachmentupdatejob.cpp
    attachment/attachmentfromurlutils.cpp
    )
17
18

set(messagecore_misc_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
19
20
21
    misc/imagecollector.cpp
    misc/mailinglist.cpp
    )
22
23
24


set(messagecore_helper_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
25
26
    helpers/nodehelper.cpp
    )
27
28

set(messagecore_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
29
30
31
32
33
34
35
    ${messagecore_attachment_LIB_SRCS}
    ${messagecore_misc_LIB_SRCS}
    ${messagecore_helper_LIB_SRCS}
    utils/stringutil.cpp
    messagecoreutil.cpp
    settings/messagecoresettings.cpp
    )
36
37

kconfig_add_kcfg_files(messagecore_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
38
39
    settings/globalsettings_messagecore.kcfgc
    )
40
41

ki18n_wrap_ui(messagecore_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
42
43
44
    attachment/ui/attachmentpropertiesdialog.ui
    attachment/ui/attachmentpropertiesdialog_readonly.ui
    )
45

46
ecm_qt_declare_logging_category(messagecore_LIB_SRCS HEADER messagecore_debug.h IDENTIFIER MESSAGECORE_LOG CATEGORY_NAME org.kde.pim.messagecore
Laurent Montel's avatar
Laurent Montel committed
47
48
49
50
51
        DESCRIPTION "messagelib (messagecore)"
        OLD_CATEGORY_NAMES log_messagecore
        EXPORT MESSAGELIB
    )

52
53
54
55
56
57

add_library(KF5MessageCore ${messagecore_LIB_SRCS})
generate_export_header(KF5MessageCore BASE_NAME messagecore)
add_library(KF5::MessageCore ALIAS KF5MessageCore)

target_link_libraries(KF5MessageCore
Laurent Montel's avatar
Laurent Montel committed
58
59
60
61
62
63
64
65
66
67
68
    PUBLIC
    KF5::Mime
    PRIVATE
    KF5::KIOCore
    KF5::Codecs
    KF5::PimTextEdit
    KF5::Archive
    KF5::ConfigWidgets
    Qt5::Network
    KF5::I18n
    KF5::IdentityManagement
Laurent Montel's avatar
Laurent Montel committed
69
    KF5::PimCommon
Laurent Montel's avatar
Laurent Montel committed
70
    )
71
72
73
74
75
76
77

target_include_directories(KF5MessageCore INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MessageCore/;${KDE_INSTALL_INCLUDEDIR_KF5}/messagecore>")

set_target_properties(KF5MessageCore PROPERTIES
    VERSION ${MESSAGECORE_VERSION_STRING}
    SOVERSION ${MESSAGECORE_SOVERSION}
    EXPORT_NAME MessageCore
Laurent Montel's avatar
Laurent Montel committed
78
    )
79
80
81
82

install(TARGETS
    KF5MessageCore
    EXPORT KF5MessageCoreTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
Laurent Montel's avatar
Laurent Montel committed
83
    )
84
85
86


ecm_generate_headers(MessageCore_Camelcasemain_HEADERS
Laurent Montel's avatar
Laurent Montel committed
87
88
    HEADER_NAMES
    MessageCoreUtil
89

Laurent Montel's avatar
Laurent Montel committed
90
91
92
    REQUIRED_HEADERS MessageCore_main_HEADERS
    PREFIX MessageCore
    )
93
94
95


ecm_generate_headers(MessageCore_Camelcasemisc_HEADERS
Laurent Montel's avatar
Laurent Montel committed
96
97
98
    HEADER_NAMES
    ImageCollector
    MailingList
99

Laurent Montel's avatar
Laurent Montel committed
100
101
102
103
    REQUIRED_HEADERS MessageCore_misc_HEADERS
    PREFIX MessageCore
    RELATIVE misc
    )
104
105

ecm_generate_headers(MessageCore_Camelcaseutils_HEADERS
Laurent Montel's avatar
Laurent Montel committed
106
107
108
109
110
111
    HEADER_NAMES
    StringUtil
    REQUIRED_HEADERS MessageCore_utils_HEADERS
    PREFIX MessageCore
    RELATIVE utils
    )
112
113

ecm_generate_headers(MessageCore_Camelcasesettings_HEADERS
Laurent Montel's avatar
Laurent Montel committed
114
115
116
117
118
119
    HEADER_NAMES
    MessageCoreSettings
    REQUIRED_HEADERS MessageCore_settings_HEADERS
    PREFIX MessageCore
    RELATIVE settings
    )
120
121
122


ecm_generate_headers(MessageCore_Camelcaseattachment_HEADERS
Laurent Montel's avatar
Laurent Montel committed
123
124
125
126
127
128
    HEADER_NAMES
    AttachmentFromUrlBaseJob
    AttachmentPart
    AttachmentPropertiesDialog
    AttachmentCompressJob
    AttachmentUpdateJob
129
130
    AttachmentFromUrlUtils    
    AttachmentLoadJob
Laurent Montel's avatar
Laurent Montel committed
131
132
133
134
135

    REQUIRED_HEADERS MessageCore_attachment_HEADERS
    PREFIX MessageCore
    RELATIVE attachment
    )
136
137

ecm_generate_headers(MessageCore_Camelcasehelpers_HEADERS
Laurent Montel's avatar
Laurent Montel committed
138
139
140
141
142
143
    HEADER_NAMES
    NodeHelper
    REQUIRED_HEADERS MessageCore_helpers_HEADERS
    PREFIX MessageCore
    RELATIVE helpers
    )
144
145
146
147

ecm_generate_pri_file(BASE_NAME MessageCore
    LIB_NAME KF5MessageCore
    DEPS "Mime" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MessageCore
Laurent Montel's avatar
Laurent Montel committed
148
    )
149
150


Laurent Montel's avatar
Laurent Montel committed
151

152
153
154
155
156
157
158
159
160
install(FILES
    ${MessageCore_Camelcasehelpers_HEADERS}
    ${MessageCore_Camelcasesettings_HEADERS}
    ${MessageCore_Camelcaseutils_HEADERS}
    ${MessageCore_Camelcaseattachment_HEADERS}
    ${MessageCore_Camelcasemisc_HEADERS}
    ${MessageCore_Camelcasemain_HEADERS}
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MessageCore
    COMPONENT Devel
Laurent Montel's avatar
Laurent Montel committed
161
    )
162
163
164
165
166
167
168
169
170
171
172
173
174

install(FILES
    ${MessageCore_HEADERS}
    ${MessageCore_helpers_HEADERS}
    ${MessageCore_settings_HEADERS}
    ${MessageCore_utils_HEADERS}
    ${MessageCore_main_HEADERS}
    ${CMAKE_CURRENT_BINARY_DIR}/messagecore_export.h
    ${CMAKE_CURRENT_BINARY_DIR}/globalsettings_messagecore.h
    ${MessageCore_attachment_HEADERS}
    ${MessageCore_misc_HEADERS}
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/messagecore
    COMPONENT Devel
Laurent Montel's avatar
Laurent Montel committed
175
    )
176
177
178
179
install(FILES
    ${PRI_FILENAME}
    DESTINATION ${ECM_MKSPECS_INSTALL_DIR})

Laurent Montel's avatar
Laurent Montel committed
180