CMakeLists.txt 8.08 KB
Newer Older
1

Laurent Montel's avatar
Laurent Montel committed
2
ecm_setup_version(PROJECT VARIABLE_PREFIX LIBKDEPIM
Laurent Montel's avatar
Laurent Montel committed
3
4
5
6
    VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/libkdepim_version.h"
    PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfigVersion.cmake"
    SOVERSION 5
    )
Laurent Montel's avatar
Laurent Montel committed
7

8
add_subdirectory(pics)
9
if (BUILD_TESTING)
Laurent Montel's avatar
Laurent Montel committed
10
    add_subdirectory(tests)
11
    add_subdirectory(misc/autotests)
12
    add_subdirectory(addressline/autotests/)
Laurent Montel's avatar
Laurent Montel committed
13
    add_subdirectory(progresswidget/autotests/)
Laurent Montel's avatar
Laurent Montel committed
14
    add_subdirectory(progresswidget/tests/)
15
endif()
16
17
18
19


########### next target ###############
set(kdepim_progresswidget_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
20
21
22
23
24
25
    progresswidget/progressmanager.cpp
    progresswidget/progressdialog.cpp
    progresswidget/statusbarprogresswidget.cpp
    progresswidget/ssllabel.cpp
    progresswidget/progressstatusbarwidget.cpp
    )
26
27

set(kdepim_widgets_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
28
29
30
31
32
33
34
35
36
    widgets/customlogwidget.cpp
    widgets/kdatepickerpopup.cpp
    widgets/kcheckcombobox.cpp
    widgets/kweekdaycheckcombo.cpp
    widgets/kwidgetlister.cpp
    widgets/pimmessagebox.cpp
    widgets/overlaywidget.cpp
    widgets/progressindicatorlabel.cpp
    )
37
38

set(kdepim_ldap_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
39
40
41
42
43
    ldap/ldapclient.cpp
    ldap/ldapsearchdialog.cpp
    ldap/ldapclientsearch.cpp
    ldap/ldapclientsearchconfig.cpp
    ldap/addhostdialog.cpp
Laurent Montel's avatar
Laurent Montel committed
44
    ldap/ldapconfigurewidget.cpp
Laurent Montel's avatar
Laurent Montel committed
45
    )
Laurent Montel's avatar
Laurent Montel committed
46

47
ecm_qt_declare_logging_category(kdepim_ldap_LIB_SRCS HEADER ldapclient_debug.h IDENTIFIER LDAPCLIENT_LOG CATEGORY_NAME org.kde.pim.ldapclient
Laurent Montel's avatar
Laurent Montel committed
48
49
50
51
        DESCRIPTION "ldapclient (libkdepim)"
        OLD_CATEGORY_NAMES log_ldapclient
        EXPORT LIBKDEPIM
    )
52
53

set(kdepim_misc_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
54
55
56
57
    misc/broadcaststatus.cpp
    misc/emailvalidator.cpp
    misc/maillistdrag.cpp
    misc/uistatesaver.cpp
58
    misc/lineeditcatchreturnkey.cpp
Laurent Montel's avatar
Laurent Montel committed
59
    )
60
61

set(kdepim_multiplyingline_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
62
63
64
65
    multiplyingline/multiplyingline.cpp
    multiplyingline/multiplyinglineeditor.cpp
    multiplyingline/multiplyinglineview_p.cpp
    )
66

67
68
69
set(kdepim_addressline_LIB_SRCS
    addressline/recentaddress/recentaddresswidget.cpp
    addressline/recentaddress/recentaddresses.cpp
70
    addressline/addresslineedit/addresseelineeditutil.cpp
71
72
73
    )


74
set(kdepim_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
75
76
77
78
79
    ${kdepim_progresswidget_LIB_SRCS}
    ${kdepim_widgets_LIB_SRCS}
    ${kdepim_ldap_LIB_SRCS}
    ${kdepim_misc_LIB_SRCS}
    ${kdepim_multiplyingline_LIB_SRCS}
80
    ${kdepim_addressline_LIB_SRCS}
Laurent Montel's avatar
Laurent Montel committed
81
82
    prefs/kprefsdialog.cpp
    )
83
ecm_qt_declare_logging_category(kdepim_LIB_SRCS HEADER libkdepim_debug.h IDENTIFIER LIBKDEPIM_LOG CATEGORY_NAME org.kde.pim.libkdepim
Laurent Montel's avatar
Laurent Montel committed
84
85
86
87
88
        DESCRIPTION "libkdepim (libkdepim)"
        OLD_CATEGORY_NAMES log_libkdepim
        EXPORT LIBKDEPIM
    )

89
90
91
92
93
94
95
96
97


add_library(KF5Libkdepim ${kdepim_LIB_SRCS})
generate_export_header(KF5Libkdepim BASE_NAME kdepim)
add_library(KF5::Libkdepim ALIAS KF5Libkdepim)
target_include_directories(KF5Libkdepim INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/Libkdepim/;${KDE_INSTALL_INCLUDEDIR_KF5}/libkdepim>")
target_include_directories(KF5Libkdepim PUBLIC "$<BUILD_INTERFACE:${libkdepim_SOURCE_DIR}/src;${libkdepim_BINARY_DIR}/src;>")

target_link_libraries(KF5Libkdepim
Laurent Montel's avatar
Laurent Montel committed
98
99
100
101
102
103
104
105
106
107
108
    PRIVATE
    KF5::Ldap
    KF5::Contacts
    KF5::Codecs
    KF5::Completion
    KF5::I18n
    KF5::KCMUtils
    KF5::Wallet
    KF5::KIOCore
    KF5::KIOWidgets
    )
109
110
111


if(MINGW)
Laurent Montel's avatar
Laurent Montel committed
112
    target_link_libraries(KF5Libkdepim oleaut32)
113
114
115
116
117
118
119
endif()


set_target_properties(KF5Libkdepim PROPERTIES
    VERSION ${LIBKDEPIM_VERSION_STRING}
    SOVERSION ${LIBKDEPIM_SOVERSION}
    EXPORT_NAME Libkdepim
Laurent Montel's avatar
Laurent Montel committed
120
    )
121
122
123
124

install(TARGETS
    KF5Libkdepim
    EXPORT KF5LibkdepimTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
Laurent Montel's avatar
Laurent Montel committed
125
    )
126
127

ecm_generate_headers(libkdepim_Camelcaseldap_HEADERS
Laurent Montel's avatar
Laurent Montel committed
128
129
130
131
132
133
    HEADER_NAMES
    LdapClientSearchConfig
    LdapClientSearch
    AddHostDialog
    LdapSearchDialog
    LdapClient
Laurent Montel's avatar
Laurent Montel committed
134
    LdapConfigureWidget
Laurent Montel's avatar
Laurent Montel committed
135
136
137
138
    REQUIRED_HEADERS libkdepim_ldap_HEADERS
    PREFIX Libkdepim
    RELATIVE ldap
    )
139
140

ecm_generate_headers(libkdepim_Camelcasewidgets_HEADERS
Laurent Montel's avatar
Laurent Montel committed
141
142
143
144
145
146
    HEADER_NAMES
    CustomLogWidget
    KCheckComboBox
    KDatePickerPopup
    KWeekdayCheckCombo
    KWidgetLister
147
    OverlayWidget
Laurent Montel's avatar
Laurent Montel committed
148
149
150
151
152
153
    PIMMessageBox
    ProgressIndicatorLabel
    REQUIRED_HEADERS libkdepim_widgets_HEADERS
    PREFIX Libkdepim
    RELATIVE widgets
    )
154
155

ecm_generate_headers(libkdepim_Camelcasemisc_HEADERS
Laurent Montel's avatar
Laurent Montel committed
156
157
158
159
160
161
    HEADER_NAMES
    EmailValidator
    BroadcastStatus
    MaillistDrag
    UiStateSaver
    KCursorSaver
162
    LineEditCatchReturnKey
Laurent Montel's avatar
Laurent Montel committed
163
164
165
166
    REQUIRED_HEADERS libkdepim_misc_HEADERS
    PREFIX Libkdepim
    RELATIVE misc
    )
167
168

ecm_generate_headers(libkdepim_Camelcaseprogresswidget_HEADERS
Laurent Montel's avatar
Laurent Montel committed
169
170
171
172
173
174
175
176
177
    HEADER_NAMES
    ProgressStatusBarWidget
    StatusbarProgressWidget
    ProgressDialog
    ProgressManager
    REQUIRED_HEADERS libkdepim_progresswidget_HEADERS
    PREFIX Libkdepim
    RELATIVE progresswidget
    )
178
179

ecm_generate_headers(libkdepim_Camelcasepref_HEADERS
Laurent Montel's avatar
Laurent Montel committed
180
181
182
183
184
185
    HEADER_NAMES
    KPrefsDialog
    REQUIRED_HEADERS libkdepim_pref_HEADERS
    PREFIX Libkdepim
    RELATIVE prefs
    )
186
187

ecm_generate_headers(libkdepim_Camelcasemultiline_HEADERS
Laurent Montel's avatar
Laurent Montel committed
188
189
190
191
192
    HEADER_NAMES
    MultiplyingLine
    MultiplyingLineEditor
    REQUIRED_HEADERS libkdepim_multiline_HEADERS
    PREFIX Libkdepim
Laurent Montel's avatar
Laurent Montel committed
193
    RELATIVE multiplyingline
Laurent Montel's avatar
Laurent Montel committed
194
    )
195

196
197
198
199
ecm_generate_headers(libkdepim_Camelcaserecentaddress_HEADERS
    HEADER_NAMES
    RecentAddresses
    REQUIRED_HEADERS libkdepim_recentaddress_HEADERS
Laurent Montel's avatar
Laurent Montel committed
200
    PREFIX Libkdepim
201
202
203
    RELATIVE addressline/recentaddress/
    )

204
205
206
207
208
209
210
211
212
ecm_generate_headers(libkdepim_Camelcaseaddressline_HEADERS
    HEADER_NAMES
    AddresseeLineEditUtil
    REQUIRED_HEADERS libkdepim_addressline_HEADERS
    PREFIX Libkdepim
    RELATIVE addressline/addresslineedit/
    )


213

214
215
216

ecm_generate_pri_file(BASE_NAME Libkdepim
    LIB_NAME KF5Libkdepim
Laurent Montel's avatar
Laurent Montel committed
217
    DEPS "" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/Libkdepim
Laurent Montel's avatar
Laurent Montel committed
218
    )
219
220
221
222
223
224
225
226
227

install(FILES
    ${libkdepim_CamelcaseCamelCase_HEADERS}
    ${libkdepim_Camelcaseldap_HEADERS}
    ${libkdepim_Camelcasewidgets_HEADERS}
    ${libkdepim_Camelcaseprogresswidget_HEADERS}
    ${libkdepim_Camelcasemisc_HEADERS}
    ${libkdepim_Camelcasepref_HEADERS}
    ${libkdepim_Camelcasemultiline_HEADERS}
228
    ${libkdepim_Camelcaserecentaddress_HEADERS}
229
    ${libkdepim_Camelcaseaddressline_HEADERS}
230
231
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/Libkdepim
    COMPONENT Devel
Laurent Montel's avatar
Laurent Montel committed
232
    )
233
234
235
236
237
238
239
240
241
242

install(FILES
    ${CMAKE_CURRENT_BINARY_DIR}/kdepim_export.h
    ${libkdepim_CamelCase_HEADERS}
    ${libkdepim_ldap_HEADERS}
    ${libkdepim_progresswidget_HEADERS}
    ${libkdepim_misc_HEADERS}
    ${libkdepim_widgets_HEADERS}
    ${libkdepim_pref_HEADERS}
    ${libkdepim_multiline_HEADERS}
243
    ${libkdepim_recentaddress_HEADERS}
244
    ${libkdepim_addressline_HEADERS}
245
246
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/libkdepim
    COMPONENT Devel
Laurent Montel's avatar
Laurent Montel committed
247
    )
248
249
250
251
252

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

253
254
255
if(BUILD_DESIGNERPLUGIN)
    add_subdirectory(designer)
endif()
256
257
258
259
########### next target ###############


set( kcm_ldap_SRCS
Laurent Montel's avatar
Laurent Montel committed
260
261
    ldap/kcmldap.cpp
    )
262
263
264
265

add_library(kcm_ldap MODULE ${kcm_ldap_SRCS})


266
target_link_libraries(kcm_ldap KF5::Libkdepim KF5::KCMUtils KF5::I18n KF5::Ldap Qt5::Core)
267
268
269
270
271
272
273
274
275
276

kcoreaddons_desktop_to_json(kcm_ldap ldap/kcmldap.desktop DEFAULT_SERVICE_TYPE)

install(TARGETS kcm_ldap DESTINATION ${KDE_INSTALL_PLUGINDIR})

install(FILES ldap/kcmldap.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})

########### install files ###############

install(FILES interfaces/org.kde.addressbook.service.xml interfaces/org.kde.mailtransport.service.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR})
Laurent Montel's avatar
Laurent Montel committed
277
278
279
280

set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Libkdepim")

configure_package_config_file(
Laurent Montel's avatar
Laurent Montel committed
281
282
283
284
    "${CMAKE_CURRENT_SOURCE_DIR}/KF5LibkdepimConfig.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfig.cmake"
    INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
    )
Laurent Montel's avatar
Laurent Montel committed
285
286

install(FILES
Laurent Montel's avatar
Laurent Montel committed
287
288
289
290
291
    "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfig.cmake"
    "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfigVersion.cmake"
    DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
    COMPONENT Devel
    )
Laurent Montel's avatar
Laurent Montel committed
292
293
294
295

install(EXPORT KF5LibkdepimTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5LibkdepimTargets.cmake NAMESPACE KF5::)

install(FILES
Laurent Montel's avatar
Laurent Montel committed
296
297
298
    ${CMAKE_CURRENT_BINARY_DIR}/libkdepim_version.h
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
    )