3 include(CheckIncludeFiles)
7 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${KDE4_DATA_DIR}/cmake/modules)
9 qt4_generate_dbus_interface(kmkernel.h org.kde.kmail.kmail.xml OPTIONS -a)
11 add_custom_target(kmail_xml ALL
12 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kmail.kmail.xml
13 COMMENT "Helper target for XML stuff. The Kontact plugin, KOrganizer and others depend on it."
19 ${CMAKE_SOURCE_DIR}/libkdepim
20 ${CMAKE_BINARY_DIR}/libkdepim
21 ${CMAKE_SOURCE_DIR}/libksieve
22 ${CMAKE_SOURCE_DIR}/libkleo
23 ${CMAKE_SOURCE_DIR}/messagelist
24 ${CMAKE_SOURCE_DIR}/messageviewer
25 ${CMAKE_SOURCE_DIR}/templateparser
26 ${CMAKE_BINARY_DIR}/templateparser
27 ${CMAKE_SOURCE_DIR}/messagecomposer
28 ${CMAKE_BINARY_DIR}/messagecomposer
29 ${CMAKE_SOURCE_DIR}/messagecore
30 ${CMAKE_SOURCE_DIR}/mailcommon
31 ${CMAKE_BINARY_DIR}/mailcommon
32 ${CMAKE_SOURCE_DIR}/korganizer
35 ${CMAKE_CURRENT_BINARY_DIR}/../ontologies
37 ${SOPRANO_INCLUDE_DIR}
40 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
43 if (NOT WINCE AND KDEPIM_BUILD_DESKTOP)
44 add_subdirectory(about)
45 add_subdirectory(pics)
46 add_subdirectory(icons)
47 add_subdirectory(avscripts)
48 add_subdirectory(tests)
49 add_subdirectory(kconf_update)
50 endif(NOT WINCE AND KDEPIM_BUILD_DESKTOP)
51 add_subdirectory(kcm_kpimidentities)
53 ########### kmailprivate ###############
55 if (NOT WINCE AND KDEPIM_BUILD_DESKTOP)
57 set(kmailprivate_LIB_SRCS
59 collectiontemplatespage.cpp
60 collectionmaintenancepage.cpp
61 collectionviewpage.cpp
62 collectionquotapage.cpp
63 collectionquotapage_p.cpp
67 configagentdelegate.cpp
68 configuredialoglistview.cpp
71 simplestringlisteditor.cpp
96 foldershortcutdialog.cpp
97 mailinglistpropertiesdialog.cpp
102 attachmentcontroller.cpp
105 archivefolderdialog.cpp
106 searchdescriptionattribute.cpp
109 foldershortcutactionmanager.cpp
110 addressvalidationjob.cpp
112 newidentitydialog.cpp
113 kmsearchmessagemodel.cpp
117 soprano_add_ontology(kmailprivate_LIB_SRCS
118 ${CMAKE_SOURCE_DIR}/messagecore/messagetag.trig
125 # qt4_generate_dbus_interface(kmcomposewin.h org.kde.kmail.mailcomposer.xml OPTIONS -a)
126 # qt4_add_dbus_adaptor(kmailprivate_LIB_SRCS
127 # ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.mailcomposer.xml kmcomposewin.h KMComposeWin
130 qt4_add_dbus_adaptor(kmailprivate_LIB_SRCS
131 ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml kmkernel.h KMKernel
133 qt4_add_dbus_adaptor(kmailprivate_LIB_SRCS
134 ${CMAKE_SOURCE_DIR}/libkdepim/interfaces/org.kde.mailtransport.service.xml mailserviceimpl.h
135 KMail::MailServiceImpl
138 qt4_add_dbus_interfaces(kmailprivate_LIB_SRCS
139 ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml
142 kde4_add_ui_files(kmailprivate_LIB_SRCS
143 ui/composercryptoconfiguration.ui
144 ui/warningconfiguration.ui
145 ui/smimeconfiguration.ui
146 ui/miscpagemaintab.ui
147 ui/securitypagegeneraltab.ui
149 ui/accountspagereceivingtab.ui
152 # KCFG files. The main kmail.kcfg is configured by CMake and put
153 # in the build directory.
155 if(KDEPIM_ENTERPRISE_BUILD)
156 set(WARN_TOOMANY_RECIPIENTS_DEFAULT true)
157 else(KDEPIM_ENTERPRISE_BUILD)
158 set(WARN_TOOMANY_RECIPIENTS_DEFAULT false)
159 endif(KDEPIM_ENTERPRISE_BUILD)
161 configure_file(kmail.kcfg.cmake ${CMAKE_CURRENT_BINARY_DIR}/kmail.kcfg)
163 kde4_add_kcfg_files(kmailprivate_LIB_SRCS
164 globalsettings_base.kcfgc
165 custommimeheader.kcfgc
169 kde4_add_library(kmailprivate ${LIBRARY_TYPE} ${kmailprivate_LIB_SRCS})
171 target_link_libraries(kmailprivate
172 ${KDEPIMLIBS_KMBOX_LIBS}
173 ${KDEPIMLIBS_KMIME_LIBS}
174 ${KDEPIMLIBS_AKONADI_LIBS}
175 ${KDEPIMLIBS_AKONADI_KMIME_LIBS}
181 ${KDEPIMLIBS_KPIMIDENTITIES_LIBS}
182 ${KDEPIMLIBS_KONTACTINTERFACE_LIBS}
183 ${KDE4_PHONON_LIBRARY}
184 ${KDE4_KNOTIFYCONFIG_LIBRARY}
185 ${KDEPIMLIBS_MAILTRANSPORT_LIBS}
186 ${KDEPIMLIBS_KIMAP_LIBS}
187 ${KDE4_KPARTS_LIBRARY}
188 ${KDEPIMLIBS_KRESOURCES_LIBS}
189 ${KDE4_KCMUTILS_LIBS}
198 ${KDEPIMLIBS_KABC_LIBS}
199 ${KDEPIMLIBS_KPIMUTILS_LIBS}
200 ${KDEPIMLIBS_KPIMTEXTEDIT_LIBS}
205 ${QT_QTWEBKIT_LIBRARY}
206 ${QT_QTSCRIPT_LIBRARY}
208 ${NEPOMUK_QUERY_LIBRARIES}
211 set_target_properties(kmailprivate
212 PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION}
215 ########### kcm_kmail ###############
217 set(kcm_kmail_PART_SRCS kcm_kmail.cpp )
218 kde4_add_plugin(kcm_kmail ${kcm_kmail_PART_SRCS})
219 target_link_libraries(kcm_kmail ${KDE4_KDEUI_LIBS} kmailprivate )
221 ########### kmailpart ###############
223 set(kmailpart_PART_SRCS kmail_part.cpp )
224 qt4_generate_dbus_interface(kmail_part.h org.kde.kmail.kmailpart.xml OPTIONS -a)
225 qt4_add_dbus_adaptor(kmailpart_PART_SRCS
226 ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmailpart.xml kmail_part.h KMailPart
228 qt4_add_dbus_interfaces(kmailpart_PART_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmailpart.xml)
229 kde4_add_plugin(kmailpart ${kmailpart_PART_SRCS})
230 target_link_libraries(kmailpart
232 ${KDEPIMLIBS_AKONADI_LIBS}
236 ${KDE4_KCMUTILS_LIBS}
239 ########### KMail executable ###############
241 set(kmail_SRCS main.cpp)
242 kde4_add_app_icon(kmail_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi*-apps-kmail.png")
243 kde4_add_executable(kmail ${kmail_SRCS})
244 target_link_libraries(kmail
247 ${KDEPIMLIBS_KONTACTINTERFACE_LIBS}
250 ${QT_QTSCRIPT_LIBRARY}
254 ########### install files ###############
256 install(TARGETS kmailprivate ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
258 install(TARGETS kmail ${INSTALL_TARGETS_DEFAULT_ARGS})
260 install(PROGRAMS KMail2.desktop kmail_view.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
262 ${CMAKE_CURRENT_BINARY_DIR}/kmail.kcfg
263 DESTINATION ${KCFG_INSTALL_DIR}
265 install(FILES kmail.antispamrc kmail.antivirusrc DESTINATION ${CONFIG_INSTALL_DIR})
266 install(FILES tips DESTINATION ${DATA_INSTALL_DIR}/kmail2)
268 kmail_config_misc.desktop
269 kmail_config_appearance.desktop
270 kmail_config_identity.desktop
271 kmail_config_accounts.desktop
272 kmail_config_composer.desktop
273 kmail_config_security.desktop
274 DESTINATION ${SERVICES_INSTALL_DIR}
282 DESTINATION ${DATA_INSTALL_DIR}/kmail2
284 install(FILES dbusmail.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
288 DESTINATION ${PLUGIN_INSTALL_DIR}
291 ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmailpart.xml
292 ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml
293 DESTINATION ${DBUS_INTERFACES_INSTALL_DIR}
296 install( FILES kmail_addattachmentservicemenu.desktop DESTINATION
297 ${SERVICES_INSTALL_DIR}/ServiceMenus)
299 endif (NOT WINCE AND KDEPIM_BUILD_DESKTOP)