3 option(KDE4_KDEPIM_NEW_DISTRLISTS "Whether to use new distribution lists, which stores them like normal contacts; useful for Kolab")
4 if(KDE4_KDEPIM_NEW_DISTRLISTS)
5 add_definitions (-DKDEPIM_NEW_DISTRLISTS)
6 endif(KDE4_KDEPIM_NEW_DISTRLISTS)
8 add_definitions ( -DTest1Area=5121 ) # jstaniek
10 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
12 # search packages used by KDE
13 find_package (KDE4 REQUIRED)
16 include(MacroOptionalAddSubdirectory)
17 include(CheckIncludeFiles)
18 include(FindKdepimLibs)
21 # detect oxygen icon dir at configure time based on KDEDIRS - there may be different package installation locations
22 execute_process(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path icon OUTPUT_VARIABLE _dir ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
23 file(TO_CMAKE_PATH "${_dir}" __dir)
24 find_path(KDE4_ICON_DIR oxygen PATHS
27 message(STATUS "using oxygen application icons from ${KDE4_ICON_DIR}")
29 set (KDE4_ICON_DIR ${CMAKE_INSTALL_PREFIX}/share/icons)
32 # this macro exists to work around a stupid Mac OS X linker bug
33 # where it can't handle the same library being referenced multiple
34 # times on the linker line
35 macro (KDEPIM4_LINK_UNIQUE_LIBRARIES)
38 set(LINK_ARG_FOUND FALSE)
39 foreach(existing ${LINK_ARG_LIST})
40 if(${arg} STREQUAL ${existing})
42 endif(${arg} STREQUAL ${existing})
45 if(NOT ${LINK_ARG_FOUND})
46 list(APPEND LINK_ARG_LIST ${arg})
47 endif(NOT ${LINK_ARG_FOUND})
50 target_link_libraries(${LINK_ARG_LIST})
51 endmacro (KDEPIM4_LINK_UNIQUE_LIBRARIES)
53 find_package(Boost REQUIRED)
54 macro_log_feature(Boost_FOUND "boost" "Boost C++ Libraries" "http://www.boost.org/" TRUE "" "Required by Akonadi and kleopatra")
57 find_package(QGpgme REQUIRED)
59 add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DHAVE_CONFIG_H=1)
61 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${QT_QTDBUS_INCLUDE_DIR} )
63 include (kleopatra/ConfigureChecks.cmake)
65 add_subdirectory(libkleo)
67 find_path(TOPOLOGICAL_SORT_DIR NAMES boost/graph/topological_sort.hpp PATHS ${Boost_INCLUDE_DIRS})
68 if(TOPOLOGICAL_SORT_DIR)
69 macro_optional_add_subdirectory(kleopatra)
70 else(TOPOLOGICAL_SORT_DIR)
71 message(STATUS "topological_sort.hpp is necessary to compile kleopatra. Please install package which contains it.")
72 endif(TOPOLOGICAL_SORT_DIR)
74 macro_optional_add_subdirectory(doc)
77 # regular case, build everything
79 find_package(Akonadi REQUIRED)
81 if ( NOT EXISTS ${CMAKE_SOURCE_DIR}/libkdepim/kdepim_export.h )
82 message ( FATAL_ERROR "libkdepim directory not found" ) # needed for Kode to compile correctly
83 endif ( NOT EXISTS ${CMAKE_SOURCE_DIR}/libkdepim/kdepim_export.h )
84 find_package(Kode REQUIRED)
85 find_package(ZLIB REQUIRED)
86 find_package(Strigi REQUIRED)
90 macro_log_feature(X11_Xscreensaver_LIB "libXss" "X Window Screen Saver Development Library" "http://xorg.freedesktop.org" FALSE "" "Required for building the KTimeTracker Program")
94 set(OPENSYNC_MIN_VERSION 0.38)
95 macro_optional_find_package(OpenSync)
96 macro_log_feature(OPENSYNC_FOUND "opensync" "OpenSync Development Libraries" "http://www.opensync.org" FALSE "0.38 or greater" "Needed to provide syncing functionality in KDE PIM applications. Necessary to compile kitchensync.")
97 macro_optional_find_package(GLIB2)
98 macro_log_feature(GLIB2_FOUND "glib2" "Low-level core library for data structure handling, portability wrappers, etc." "http://www.gtk.org" FALSE "2.x" "Needed to provide synching applications from KDE PIM applications. Necessary to compile kitchensync and other PIM applications.")
101 macro_optional_find_package(GNOKII)
102 macro_bool_to_01(GNOKII_FOUND HAVE_GNOKII_H)
103 macro_log_feature(GNOKII_FOUND "gnokii" "Gnokii Development Libraries" "http://www.gnokii.org" FALSE "" "Needed to provide the ability to import and export KDE addressbook entries to/from mobile phones that are accessible via gnokii")
105 macro_optional_find_package(Soprano)
106 macro_log_feature(Soprano_FOUND "Soprano" "Semantic Desktop Storing" "" FALSE "" "Soprano is needed for Nepomuk")
108 macro_optional_find_package(Nepomuk)
109 macro_log_feature(Nepomuk_FOUND "Nepomuk" "Nepomuk" "http://www.kde.org" FALSE "" "For adding desktop-wide tagging support to kmail")
111 find_program(XSLTPROC_EXECUTABLE xsltproc)
112 macro_log_feature(XSLTPROC_EXECUTABLE "xsltproc" "The command line XSLT processor from libxslt" "http://xmlsoft.org/XSLT/" FALSE "" "Needed for building Akonadi resources. Recommended.")
114 add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
116 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDEPIMLIBS_INCLUDE_DIR} ${KDE4_INCLUDES} ${QT_QTDBUS_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/libkdepim/)
118 include (kleopatra/ConfigureChecks.cmake)
120 set(libknotesresources_SRCS
121 ${CMAKE_SOURCE_DIR}/knotes/resourcemanager.cpp
122 ${CMAKE_SOURCE_DIR}/knotes/resourcenotes.cpp
123 ${CMAKE_SOURCE_DIR}/knotes/resourcelocal.cpp
124 ${CMAKE_SOURCE_DIR}/knotes/resourcelocalconfig.cpp
127 set(libknoteseditor_SRCS
128 ${CMAKE_SOURCE_DIR}/knotes/knoteedit.cpp
132 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttView.cpp
133 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewEventItem.cpp
134 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewItem.cpp
135 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewItemDrag.cpp
136 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewSubwidgets.cpp
137 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewSummaryItem.cpp
138 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewTaskItem.cpp
139 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewTaskLink.cpp
140 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewTaskLinkGroup.cpp
141 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttMinimizeSplitter.cpp
142 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttSemiSizingControl.cpp
143 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttSizingControl.cpp
144 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttXMLTools.cpp
147 macro_optional_add_subdirectory(doc)
148 add_subdirectory(kode)
149 macro_optional_add_subdirectory(akonadi)
150 add_subdirectory(libkdepim)
151 add_subdirectory(libkholidays)
152 add_subdirectory(kontactinterfaces)
154 find_path(TOPOLOGICAL_SORT_DIR NAMES boost/graph/topological_sort.hpp PATHS ${Boost_INCLUDE_DIRS})
156 if(TOPOLOGICAL_SORT_DIR)
157 macro_optional_add_subdirectory(kleopatra)
158 else(TOPOLOGICAL_SORT_DIR)
159 message(STATUS "topological_sort.hpp is necessary to compile kleopatra. Please install package which contains it.")
160 endif(TOPOLOGICAL_SORT_DIR)
161 add_subdirectory(libkleo)
164 add_subdirectory(libkpgp)
165 add_subdirectory(libksieve)
166 add_subdirectory(mimelib)
167 add_subdirectory(icons)
168 macro_optional_add_subdirectory(akregator)
169 macro_optional_add_subdirectory(knode)
170 macro_optional_add_subdirectory(kjots)
173 set(KMAIL_SUPPORTED TRUE)
174 add_definitions(-DKMAIL_SUPPORTED)
175 message(STATUS "KMail support enabled.")
176 macro_optional_add_subdirectory(kmail)
178 set(KMAIL_SUPPORTED FALSE)
179 message(STATUS "KMail support DISABLED (QGPGME not found).")
182 macro_optional_add_subdirectory(kalarm)
183 macro_optional_add_subdirectory(kaddressbook)
186 set(KTIMETRACKER_SUPPORTED TRUE)
187 add_definitions(-DKTIMETRACKER_SUPPORTED)
188 message(STATUS "KTimeTracker support enabled.")
189 macro_optional_add_subdirectory(ktimetracker)
191 set(KTIMETRACKER_SUPPORTED FALSE)
192 message(STATUS "KTimeTracker support DISABLED (non-X11 target).")
195 add_subdirectory(kdgantt1)
197 macro_optional_add_subdirectory(strigi-analyzer)
199 if(QGPGME_FOUND AND KMAIL_SUPPORTED)
200 macro_optional_add_subdirectory(kmailcvt)
201 message(STATUS "KMailCVT support enabled.")
202 else(QGPGME_FOUND AND KMAIL_SUPPORTED)
203 message(STATUS "KMailCVT support DISABLED (because KMail support is disabled).")
204 endif(QGPGME_FOUND AND KMAIL_SUPPORTED)
205 macro_optional_add_subdirectory(knotes)
206 macro_optional_add_subdirectory(console)
208 if(QGPGME_FOUND AND KMAIL_SUPPORTED)
209 macro_optional_add_subdirectory(korganizer)
210 message(STATUS "KOrganizer support enabled.")
211 else(QGPGME_FOUND AND KMAIL_SUPPORTED)
212 message(STATUS "KOrganizer support DISABLED (because KMail support is disabled).")
213 endif(QGPGME_FOUND AND KMAIL_SUPPORTED)
216 macro_optional_add_subdirectory(ksendemail)
217 message(STATUS "KSendEmail support enabled.")
218 else(KMAIL_SUPPORTED)
219 message(STATUS "KSendEmail support DISABLED (because KMail support is disabled).")
220 endif(KMAIL_SUPPORTED)
223 #enable kmobiletools for 4.2
224 # set(KMOBILETOOLS_SUPPORTED TRUE)
225 # add_definitions(-DKMOBILETOOLS_SUPPORTED)
226 # message(STATUS "KMobileTools support enabled.")
227 # macro_optional_add_subdirectory(kmobiletools)
228 set(KMOBILETOOLS_SUPPORTED FALSE)
230 set(KPILOT_SUPPORTED TRUE)
231 add_definitions(-DKPILOT_SUPPORTED)
232 message(STATUS "KPilot support enabled.")
233 macro_optional_add_subdirectory(kpilot)
235 if(OPENSYNC_FOUND AND GLIB2_FOUND)
236 set(KITCHENSYNC_SUPPORTED TRUE)
237 add_definitions(-DKITCHENSYNC_SUPPORTED)
238 message(STATUS "KitchenSync support enabled.")
239 macro_optional_add_subdirectory(kitchensync)
240 else(OPENSYNC_FOUND AND GLIB2_FOUND)
241 set(KITCHENSYNC_SUPPORTED FALSE)
242 if(NOT OPENSYNC_FOUND)
243 message(STATUS "KitchenSync support disabled (OpenSync not found).")
244 endif(NOT OPENSYNC_FOUND)
246 message(STATUS "KitchenSync support disabled (GLIB not found).")
247 endif(NOT GLIB2_FOUND)
248 endif(OPENSYNC_FOUND AND GLIB2_FOUND)
250 set(KMOBILETOOLS_SUPPORTED FALSE)
251 message(STATUS "KMobileTools support DISABLED (Windows target).")
252 set(KPILOT_SUPPORTED FALSE)
253 message(STATUS "KPilot support DISABLED (Windows target).")
254 set(KITCHENSYNC_SUPPORTED FALSE)
255 message(STATUS "KitchenSync support DISABLED (Windows target).")
258 #enable korn in 4.2 if there is interest
259 # macro_optional_add_subdirectory(korn)
260 add_subdirectory(kresources)
261 macro_optional_add_subdirectory(kontact)
264 add_subdirectory(wizards)
267 add_subdirectory(cmake)
269 # maildir access library
270 add_subdirectory(maildir)
272 add_subdirectory(plugins)
276 macro_display_feature_log()