CMakeLists.txt 6.85 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
ecm_setup_version(PROJECT VARIABLE_PREFIX LIBKDEPIM
Laurent Montel's avatar
Laurent Montel committed
2
3
4
5
    VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/libkdepimakonadi_version.h"
    PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimAkonadiConfigVersion.cmake"
    SOVERSION 5
    )
6

7
8
9
10
11
12
13
14
15
16
if(BUILD_TESTING)
    add_subdirectory(tests)
    add_subdirectory(addressline/blacklistbaloocompletion/autotests)
    add_subdirectory(addressline/autotests/)
endif()


add_subdirectory(designer)

set(kdepim_addressline_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
17
18
19
20
21
22
23
24
25
26
    addressline/completionorder/completionordereditor.cpp
    addressline/completionorder/completionorderwidget.cpp
    addressline/addresslineedit/addresseelineedit.cpp
    addressline/addresslineedit/addresseelineedit_p.cpp
    addressline/addresslineedit/addresseelineeditstatic.cpp
    addressline/addresslineedit/kmailcompletion.cpp
    addressline/addresslineedit/baloocompletionemail.cpp
    addressline/completionconfiguredialog/completionconfiguredialog.cpp
    addressline/addresslineedit/addresseelineeditutil.cpp
    )
27
28

set(kdepim_addressline_blacklist_baloo_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
29
30
31
32
33
34
    addressline/blacklistbaloocompletion/blacklistbalooemaillist.cpp
    addressline/blacklistbaloocompletion/blacklistbalooemailsearchjob.cpp
    addressline/blacklistbaloocompletion/blacklistbalooemailutil.cpp
    addressline/blacklistbaloocompletion/blacklistbalooemailcompletionwidget.cpp
    addressline/blacklistbaloocompletion/blacklistbalooemailwarning.cpp
    )
35
36


37
############ next target ###############
Laurent Montel's avatar
Laurent Montel committed
38
set(kdepimakonadi_progresswidget_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
39
40
41
    progresswidget/progressmanagerakonadi.cpp
    progresswidget/agentprogressmonitor.cpp
    )
42

43
set(kdepim_job_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
44
45
46
47
48
49
50
    job/addemailaddressjob.cpp
    job/addcontactjob.cpp
    job/openemailaddressjob.cpp
    job/addemaildisplayjob.cpp
    job/collectionsearchjob.cpp
    job/personsearchjob.cpp
    )
51

52
set(kdepimakonadi_widgets_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
53
54
55
    widgets/tagwidgets.cpp
    widgets/tagselectioncombo.cpp
    )
56
57
58



59
set(kdepimakonadi_LIB_SRCS
Laurent Montel's avatar
Laurent Montel committed
60
61
62
63
64
65
    ${kdepim_job_LIB_SRCS}
    ${kdepimakonadi_widgets_LIB_SRCS}
    ${kdepim_addressline_LIB_SRCS}
    ${kdepim_addressline_blacklist_baloo_LIB_SRCS}
    ${kdepimakonadi_progresswidget_LIB_SRCS}
    )
66

Laurent Montel's avatar
Laurent Montel committed
67

68
69
70
71
72
73
74
75
76
77
78
79
ecm_qt_declare_logging_category(kdepimakonadi_LIB_SRCS HEADER libkdepimakonadi_debug.h IDENTIFIER LIBKDEPIMAKONADI_LOG CATEGORY_NAME org.kde.pim.libkdepimakonadi)


add_library(KF5LibkdepimAkonadi ${kdepimakonadi_LIB_SRCS})
generate_export_header(KF5LibkdepimAkonadi BASE_NAME kdepimakonadi)
add_library(KF5::LibkdepimAkonadi ALIAS KF5LibkdepimAkonadi)
target_include_directories(KF5LibkdepimAkonadi INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/Libkdepim/;${KDE_INSTALL_INCLUDEDIR_KF5}/libkdepim>")
target_include_directories(KF5LibkdepimAkonadi PUBLIC "$<BUILD_INTERFACE:${libkdepim_SOURCE_DIR}/src;${libkdepim_BINARY_DIR}/src;>")



target_link_libraries(KF5LibkdepimAkonadi
Laurent Montel's avatar
Laurent Montel committed
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
    PUBLIC
    KF5::AkonadiCore
    KF5::AkonadiContact
    KF5::Libkdepim
    PRIVATE
    KF5::AkonadiWidgets
    KF5::Ldap
    KF5::Contacts
    KF5::Codecs
    KF5::Completion
    KF5::I18n
    KF5::ItemViews
    KF5::AkonadiSearchPIM
    KF5::KIOCore
    KF5::KIOWidgets
    Qt5::DBus
    Qt5::Network
Laurent Montel's avatar
Laurent Montel committed
97
    KF5::ConfigWidgets
Laurent Montel's avatar
Laurent Montel committed
98
    )
99
100

if(MINGW)
Laurent Montel's avatar
Laurent Montel committed
101
    target_link_libraries(KF5LibkdepimAkonadi oleaut32)
102
103
104
105
106
107
endif()

set_target_properties(KF5LibkdepimAkonadi PROPERTIES
    VERSION ${LIBKDEPIM_VERSION_STRING}
    SOVERSION ${LIBKDEPIM_SOVERSION}
    EXPORT_NAME LibkdepimAkonadi
Laurent Montel's avatar
Laurent Montel committed
108
    )
109
110
111

install(TARGETS
    KF5LibkdepimAkonadi
Laurent Montel's avatar
Laurent Montel committed
112
    EXPORT KF5LibkdepimAkonadiTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
Laurent Montel's avatar
Laurent Montel committed
113
    )
114

115
ecm_generate_headers(libkdepimakonadi_Camelcasewidgets_HEADERS
Laurent Montel's avatar
Laurent Montel committed
116
117
118
119
120
121
122
    HEADER_NAMES
    TagSelectionCombo
    TagWidgets
    REQUIRED_HEADERS libkdepimakonadi_widgets_HEADERS
    PREFIX LibkdepimAkonadi
    RELATIVE widgets
    )
123

Laurent Montel's avatar
Laurent Montel committed
124
ecm_generate_headers(libkdepimakonadi_Camelcaseprogresswidget_HEADERS
Laurent Montel's avatar
Laurent Montel committed
125
126
127
128
129
130
    HEADER_NAMES
    ProgressManagerAkonadi
    REQUIRED_HEADERS libkdepimakonadi_progresswidget_HEADERS
    PREFIX LibkdepimAkonadi
    RELATIVE progresswidget
    )
131

132
ecm_generate_headers(libkdepim_Camelcasejob_HEADERS
Laurent Montel's avatar
Laurent Montel committed
133
134
135
136
137
138
139
140
141
142
143
144
145
    HEADER_NAMES
    AddContactJob
    AddEmailAddressJob
    AddEmailDisplayJob
    CollectionSearchJob
    OpenEmailAddressJob
    PersonSearchJob
    Person

    REQUIRED_HEADERS libkdepim_job_HEADERS
    PREFIX LibkdepimAkonadi
    RELATIVE job
    )
146

147
ecm_generate_headers(libkdepim_Camelcaseaddressline_HEADERS
Laurent Montel's avatar
Laurent Montel committed
148
149
150
151
    HEADER_NAMES
    AddresseeLineEdit
    REQUIRED_HEADERS libkdepim_addressline_HEADERS
    PREFIX LibkdepimAkonadi
Laurent Montel's avatar
Laurent Montel committed
152
    RELATIVE addressline/addresslineedit/
Laurent Montel's avatar
Laurent Montel committed
153
    )
154

155
ecm_generate_headers(libkdepim_Camelcasecompletionorder_HEADERS
Laurent Montel's avatar
Laurent Montel committed
156
157
158
159
160
161
    HEADER_NAMES
    CompletionOrderEditor
    REQUIRED_HEADERS libkdepim_completionorder_HEADERS
    PREFIX LibkdepimAkonadi
    RELATIVE addressline/completionorder
    )
162

163
ecm_generate_headers(libkdepim_Camelcasecompletionconfiguredialog_HEADERS
Laurent Montel's avatar
Laurent Montel committed
164
165
166
167
168
169
    HEADER_NAMES
    CompletionConfigureDialog
    REQUIRED_HEADERS libkdepim_completionconfiguredialog_HEADERS
    PREFIX LibkdepimAkonadi
    RELATIVE addressline/completionconfiguredialog/
    )
170

171
172
ecm_generate_pri_file(BASE_NAME LibkdepimAkonadi
    LIB_NAME KF5LibkdepimAkonadi
Laurent Montel's avatar
Laurent Montel committed
173
    DEPS "AkonadiCore AkonadiContact Libkdepim" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/LibkdepimAkonadi
Laurent Montel's avatar
Laurent Montel committed
174
    )
175

176
install(FILES
177
178
    ${libkdepim_Camelcasecompletionconfiguredialog_HEADERS}
    ${libkdepim_Camelcasecompletionorder_HEADERS}
Laurent Montel's avatar
Laurent Montel committed
179
    ${libkdepimakonadi_Camelcaseprogresswidget_HEADERS}
180
    ${libkdepimakonadi_Camelcasewidgets_HEADERS}
181
    ${libkdepim_Camelcasejob_HEADERS}
182
    ${libkdepim_Camelcaseaddressline_HEADERS}
183
184
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/LibkdepimAkonadi
    COMPONENT Devel
Laurent Montel's avatar
Laurent Montel committed
185
    )
186

187
install(FILES
188
189
    ${libkdepim_completionconfiguredialog_HEADERS}
    ${libkdepim_completionorder_HEADERS}
190
    ${CMAKE_CURRENT_BINARY_DIR}/kdepimakonadi_export.h
Laurent Montel's avatar
Laurent Montel committed
191
    ${libkdepimakonadi_progresswidget_HEADERS}
192
    ${libkdepimakonadi_widgets_HEADERS}
193
    ${libkdepim_job_HEADERS}
194
    ${libkdepim_addressline_HEADERS}
195
196
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/libkdepimakonadi
    COMPONENT Devel
Laurent Montel's avatar
Laurent Montel committed
197
    )
198

Laurent Montel's avatar
Laurent Montel committed
199
200
201
install(FILES
    ${PRI_FILENAME}
    DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
202

Laurent Montel's avatar
Laurent Montel committed
203
204
205

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

Daniel Vrátil's avatar
Daniel Vrátil committed
206
207
install(EXPORT KF5LibkdepimAkonadiTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5LibkdepimAkonadiTargets.cmake NAMESPACE KF5::)

Laurent Montel's avatar
Laurent Montel committed
208
configure_package_config_file(
Laurent Montel's avatar
Laurent Montel committed
209
210
211
212
    "${CMAKE_CURRENT_SOURCE_DIR}/KF5LibkdepimAkonadiConfig.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimAkonadiConfig.cmake"
    INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
    )
Laurent Montel's avatar
Laurent Montel committed
213
214

install(FILES
Laurent Montel's avatar
Laurent Montel committed
215
216
217
218
219
    "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimAkonadiConfig.cmake"
    "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimAkonadiConfigVersion.cmake"
    DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
    COMPONENT Devel
    )
Laurent Montel's avatar
Laurent Montel committed
220
221
222


install(FILES
Laurent Montel's avatar
Laurent Montel committed
223
224
225
    ${CMAKE_CURRENT_BINARY_DIR}/libkdepimakonadi_version.h
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
    )