Build with clang.
[kdepim.git] / mailcommon / CMakeLists.txt
blob5e6764199e807a3ba8ffb64cc25c539caee61e8e
1 include_directories(
2   ${CMAKE_SOURCE_DIR}/messageviewer
3   ${CMAKE_SOURCE_DIR}/templateparser
4   ${CMAKE_BINARY_DIR}/templateparser
5   ${CMAKE_CURRENT_BINARY_DIR}/../ontologies
6  )
8 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
10 set(libmailcommon_SRCS 
11   aclentrydialog.cpp
12   aclmanager.cpp
13   aclutils.cpp
14   attributeregistrar.cpp
15   collectionannotationsattribute.cpp
16   collectiongeneralpage.cpp
17   entitycollectionorderproxymodel.cpp
18   expirejob.cpp
19   expirypropertiesdialog.cpp
20   filteraction.cpp
21   filteractionwidget.cpp
22   filtercontroller.cpp
23   filtereditdialog.cpp
24   filterimporterexporter.cpp
25   filterlog.cpp
26   filtermanager.cpp
27   filtermodel.cpp
28   foldercollection.cpp
29   foldercollectionmonitor.cpp
30   folderjob.cpp
31   folderrequester.cpp
32   folderselectiondialog.cpp
33   foldertreeview.cpp
34   foldertreewidget.cpp
35   imapaclattribute.cpp
36   jobscheduler.cpp
37   mailfilter.cpp
38   mailkernel.cpp
39   mailutil.cpp
40   mdnadvicedialog.cpp
41   messageproperty.cpp
42   minimumcombobox.cpp 
43   readablecollectionproxymodel.cpp
44   redirectdialog.cpp
45   regexplineedit.cpp
46   rulewidgethandlermanager.cpp
47   searchpattern.cpp
48   searchpatternedit.cpp
49   sendmdnhandler.cpp
50   snippetdialog.cpp
51   snippetsmanager.cpp
52   snippetsmodel.cpp
53   snippetvariabledialog.cpp
56 kde4_add_ui_files(libmailcommon_SRCS filterconfigwidget.ui snippetdialog.ui)
58 if ( NOT WINCE )
59 set(libmailcommon_SRCS ${libmailcommon_SRCS}
60   soundtestwidget.cpp
62 endif ( NOT WINCE )
64 macro(add_resource_iface _kcfgFile _ifaceName _className)
65   kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/${_kcfgFile} ${_ifaceName})
66   string(TOLOWER ${_className} _codeFile) 
67   set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/${_ifaceName}.xml PROPERTIES INCLUDE "metatype.h")
68   qt4_add_dbus_interface(libmailcommon_SRCS
69     ${CMAKE_CURRENT_BINARY_DIR}/${_ifaceName}.xml ${_codeFile} ${_className}
70   )
71 endmacro(add_resource_iface)
73 add_resource_iface( imapresource.kcfg org.kde.Akonadi.Imap.Settings ImapSettings )
74 add_resource_iface( settings.kcfg org.kde.Akonadi.POP3.Settings Pop3Settings )
76 qt4_add_dbus_interfaces(libmailcommon_SRCS
77   ${CMAKE_SOURCE_DIR}/korganizer/org.kde.Korganizer.Calendar.xml
80 kde4_add_library(mailcommon ${LIBRARY_TYPE} ${libmailcommon_SRCS})
82 target_link_libraries(mailcommon messageviewer messagecore messagecomposer
83   templateparser
84   kdepim
85   akonadi_next
86   ${KDEPIMLIBS_KMIME_LIBS}
87   ${KDEPIMLIBS_AKONADI_LIBS}
88   ${KDEPIMLIBS_AKONADI_KMIME_LIBS}
89   ${KDEPIMLIBS_KPIMUTILS_LIBS}
90   ${KDEPIMLIBS_KIMAP_LIBS}
91   ${KDEPIMLIBS_MAILTRANSPORT_LIBS}
92   ${KDE4_KDEUI_LIBS}
95 if(NOT KDEPIM_NO_NEPOMUK)
96 target_link_libraries(mailcommon
97   ${NEPOMUK_QUERY_LIBRARIES}
98   ${SOPRANO_LIBRARIES}
99   niefast_apps
101 endif(NOT KDEPIM_NO_NEPOMUK)
103 if ( NOT WINCE )
104 target_link_libraries(mailcommon 
105   incidenceeditorsng
107 else( NOT WINCE )
108 target_link_libraries(mailcommon 
109   incidenceeditorsngmobile
111 endif (NOT WINCE)
113 set_target_properties( mailcommon PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
114 install(TARGETS mailcommon ${INSTALL_TARGETS_DEFAULT_ARGS} )
116 #install( FILES viewer.h attachmentstrategy.h headerstrategy.h messageviewer_export.h DESTINATION  ${INCLUDE_INSTALL_DIR}/messageviewer COMPONENT devel)