3 include(CheckIncludeFiles)
5 add_definitions(-DQT3_SUPPORT_WARNINGS)
6 add_definitions(-DDISABLE_NEPOMUK_LEGACY)
8 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${KDE4_DATA_DIR}/cmake/modules)
10 qt4_generate_dbus_interface(kmkernel.h org.kde.kmail.kmail.xml OPTIONS -a)
12 add_custom_target(kmail_xml ALL
13 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kmail.kmail.xml
14 COMMENT "Helper target for XML stuff. The Kontact plugin, KOrganizer and others depend on it."
18 ${CMAKE_SOURCE_DIR}/libkdepim
19 ${CMAKE_BINARY_DIR}/libkdepim
20 ${CMAKE_SOURCE_DIR}/libksieve
21 ${CMAKE_SOURCE_DIR}/libkleo
22 ${CMAKE_SOURCE_DIR}/messagelist
23 ${CMAKE_SOURCE_DIR}/messageviewer
24 ${CMAKE_SOURCE_DIR}/templateparser
25 ${CMAKE_BINARY_DIR}/templateparser
26 ${CMAKE_SOURCE_DIR}/messagecomposer
27 ${CMAKE_BINARY_DIR}/messagecomposer
28 ${CMAKE_SOURCE_DIR}/messagecore
29 ${CMAKE_SOURCE_DIR}/korganizer
32 ${CMAKE_SOURCE_DIR}/akonadi/
33 ${CMAKE_CURRENT_BINARY_DIR}/../ontologies
35 ${SOPRANO_INCLUDE_DIR}
38 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
41 if (QT_QT3SUPPORT_FOUND)
42 add_subdirectory(about)
43 add_subdirectory(pics)
44 add_subdirectory(icons)
45 add_subdirectory(avscripts)
46 add_subdirectory(tests)
47 add_subdirectory(kconf_update)
48 endif (QT_QT3SUPPORT_FOUND)
49 add_subdirectory(kcm_kpimidentities)
51 ########### kmailprivate ###############
53 if (QT_QT3SUPPORT_FOUND)
54 set(kmailprivate_LIB_SRCS
55 foldercollectionmonitor.cpp
56 readablecollectionproxymodel.cpp
57 entitycollectionorderproxymodel.cpp
60 folderselectiondialog.cpp
63 collectionannotationsattribute.cpp
64 collectiontemplatespage.cpp
65 collectionmaintenancepage.cpp
66 collectiongeneralpage.cpp
67 collectionviewpage.cpp
68 collectionquotapage.cpp
69 collectionquotapage_p.cpp
74 configagentdelegate.cpp
75 configuredialoglistview.cpp
78 simplestringlisteditor.cpp
89 filterimporterexporter.cpp
90 kmsearchpatternedit.cpp
119 rulewidgethandlermanager.cpp
123 foldershortcutdialog.cpp
125 expirypropertiesdialog.cpp
126 mailinglistpropertiesdialog.cpp
127 managesievescriptsdialog.cpp
133 attachmentcontroller.cpp
136 archivefolderdialog.cpp
137 searchdescriptionattribute.cpp
140 foldershortcutactionmanager.cpp
142 kmsoundtestwidget.cpp
143 addressvalidationjob.cpp
145 newidentitydialog.cpp
148 soprano_add_ontology(kmailprivate_LIB_SRCS
149 ${CMAKE_SOURCE_DIR}/messagecore/messagetag.trig
155 macro(add_resource_iface _kcfgFile _ifaceName _className)
156 kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/${_kcfgFile} ${_ifaceName})
157 string(TOLOWER ${_className} _codeFile)
158 set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/${_ifaceName}.xml PROPERTIES INCLUDE "metatype.h")
159 qt4_add_dbus_interface(kmailprivate_LIB_SRCS
160 ${CMAKE_CURRENT_BINARY_DIR}/${_ifaceName}.xml ${_codeFile} ${_className}
162 endmacro(add_resource_iface)
164 add_resource_iface( imapresource.kcfg org.kde.Akonadi.Imap.Settings ImapSettings )
166 add_resource_iface( settings.kcfg org.kde.Akonadi.POP3.Settings Pop3Settings )
170 # qt4_generate_dbus_interface(kmcomposewin.h org.kde.kmail.mailcomposer.xml OPTIONS -a)
171 # qt4_add_dbus_adaptor(kmailprivate_LIB_SRCS
172 # ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.mailcomposer.xml kmcomposewin.h KMComposeWin
175 qt4_add_dbus_adaptor(kmailprivate_LIB_SRCS
176 ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml kmkernel.h KMKernel
178 qt4_add_dbus_adaptor(kmailprivate_LIB_SRCS
179 ${CMAKE_SOURCE_DIR}/libkdepim/interfaces/org.kde.mailtransport.service.xml mailserviceimpl.h
180 KMail::MailServiceImpl
183 qt4_add_dbus_interfaces(kmailprivate_LIB_SRCS
184 ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml
185 ${CMAKE_SOURCE_DIR}/korganizer/org.kde.Korganizer.Calendar.xml
188 kde4_add_ui_files(kmailprivate_LIB_SRCS
189 ui/composercryptoconfiguration.ui
190 ui/warningconfiguration.ui
191 ui/smimeconfiguration.ui
193 ui/miscpagemaintab.ui
194 ui/securitypagegeneraltab.ui
196 ui/accountspagereceivingtab.ui
199 # KCFG files. The main kmail.kcfg is configured by CMake and put
200 # in the build directory.
202 if(KDEPIM_ENTERPRISE_BUILD)
203 set(WARN_TOOMANY_RECIPIENTS_DEFAULT true)
204 set(DELETE_INVITATIONS_AFTER_REPLY_DEFAULT true)
205 set(ALLOW_SEMICOLON_AS_ADDRESS_SEPARATOR_DEFAULT true)
206 else(KDEPIM_ENTERPRISE_BUILD)
207 set(WARN_TOOMANY_RECIPIENTS_DEFAULT false)
208 set(DELETE_INVITATIONS_AFTER_REPLY_DEFAULT false)
209 set(ALLOW_SEMICOLON_AS_ADDRESS_SEPARATOR_DEFAULT false)
210 endif(KDEPIM_ENTERPRISE_BUILD)
212 configure_file(kmail.kcfg.cmake ${CMAKE_CURRENT_BINARY_DIR}/kmail.kcfg)
214 kde4_add_kcfg_files(kmailprivate_LIB_SRCS
215 globalsettings_base.kcfgc
216 custommimeheader.kcfgc
220 kde4_add_library(kmailprivate SHARED ${kmailprivate_LIB_SRCS})
221 target_link_libraries(kmailprivate
222 ${KDEPIMLIBS_KMIME_LIBRARY}
223 ${KDEPIMLIBS_AKONADI_LIBS}
224 ${KDEPIMLIBS_AKONADI_KMIME_LIBS}
229 ${KDEPIMLIBS_KPIMIDENTITIES_LIBRARY}
230 ${KDEPIMLIBS_KONTACTINTERFACE_LIBS}
231 ${KDE4_PHONON_LIBRARY}
232 ${KDE4_KNOTIFYCONFIG_LIBRARY}
233 ${KDEPIMLIBS_KTNEF_LIBRARY}
234 ${KDEPIMLIBS_MAILTRANSPORT_LIBRARY}
235 ${KDEPIMLIBS_KIMAP_LIBRARY}
236 ${KDE4_KPARTS_LIBRARY}
237 ${KDE4_KRESOURCES_LIBRARY}
238 ${KDE4_KCMUTILS_LIBS}
245 ${KDEPIMLIBS_KABC_LIBS}
246 ${KDEPIMLIBS_KPIMUTILS_LIBS}
247 ${KDEPIMLIBS_KPIMTEXTEDIT_LIBS}
252 ${QT_QTWEBKIT_LIBRARY}
254 ${NEPOMUK_QUERY_LIBRARIES}
257 set_target_properties(kmailprivate
258 PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION}
261 ########### kcm_kmail ###############
263 set(kcm_kmail_PART_SRCS kcm_kmail.cpp )
264 kde4_add_plugin(kcm_kmail ${kcm_kmail_PART_SRCS})
265 target_link_libraries(kcm_kmail ${KDE4_KDEUI_LIBS} kmailprivate )
267 ########### kmailpart ###############
269 set(kmailpart_PART_SRCS kmail_part.cpp )
270 qt4_generate_dbus_interface(kmail_part.h org.kde.kmail.kmailpart.xml OPTIONS -a)
271 qt4_add_dbus_adaptor(kmailpart_PART_SRCS
272 ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmailpart.xml kmail_part.h KMailPart
274 qt4_add_dbus_interfaces(kmailpart_PART_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmailpart.xml)
275 kde4_add_plugin(kmailpart ${kmailpart_PART_SRCS})
276 target_link_libraries(kmailpart
278 ${KDEPIMLIBS_AKONADI_LIBS}
281 ${KDE4_KCMUTILS_LIBS}
284 ########### KMail executable ###############
286 set(kmail_SRCS main.cpp)
287 kde4_add_app_icon(kmail_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi*-apps-kmail.png")
288 kde4_add_executable(kmail ${kmail_SRCS})
289 target_link_libraries(kmail
292 ${KDEPIMLIBS_AKONADI_KCAL_LIBS}
293 ${KDEPIMLIBS_KONTACTINTERFACE_LIBS}
298 ########### install files ###############
300 install(TARGETS kmailprivate ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
301 install(TARGETS kmail ${INSTALL_TARGETS_DEFAULT_ARGS})
302 install(FILES KMail.desktop kmail_view.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
304 ${CMAKE_CURRENT_BINARY_DIR}/kmail.kcfg
305 custommimeheader.kcfg
306 DESTINATION ${KCFG_INSTALL_DIR}
308 install(FILES kmail.antispamrc kmail.antivirusrc DESTINATION ${CONFIG_INSTALL_DIR})
309 install(FILES tips DESTINATION ${DATA_INSTALL_DIR}/kmail2)
311 kmail_config_misc.desktop
312 kmail_config_appearance.desktop
313 kmail_config_identity.desktop
314 kmail_config_accounts.desktop
315 kmail_config_composer.desktop
316 kmail_config_security.desktop
317 DESTINATION ${SERVICES_INSTALL_DIR}
325 DESTINATION ${DATA_INSTALL_DIR}/kmail2
327 install(FILES dbusmail.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
331 DESTINATION ${PLUGIN_INSTALL_DIR}
334 ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmailpart.xml
335 ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml
336 DESTINATION ${DBUS_INTERFACES_INSTALL_DIR}
339 endif (QT_QT3SUPPORT_FOUND)