3 option(KDE4_KDEPIM_NEW_DISTRLISTS "Whether to use new distribution lists, which stores them like normal contacts; useful for Kolab")
4 option(BUILD_EVERYTHING "Build everything. Enabled by default. If you disable this, only the minimal parts needed for the Kolab client are built." TRUE)
6 if(KDE4_KDEPIM_NEW_DISTRLISTS)
7 add_definitions (-DKDEPIM_NEW_DISTRLISTS)
8 endif(KDE4_KDEPIM_NEW_DISTRLISTS)
10 add_definitions ( -DTest1Area=5121 ) # jstaniek
12 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
14 # search packages used by KDE
15 find_package (KDE4 REQUIRED)
18 include(CheckIncludeFiles)
19 find_package(KdepimLibs REQUIRED)
22 ##### Backwards compatibility section:
23 ##### Support building against earlier kdelibs or kdepimlibs
25 if(NOT DEFINED KDE4_KHOLIDAYS_LIBS)
26 set(KDE4_KHOLIDAYS_LIBS kholidays)
27 endif(NOT DEFINED KDE4_KHOLIDAYS_LIBS)
31 # detect oxygen icon dir at configure time based on KDEDIRS - there may be different package installation locations
32 execute_process(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path icon OUTPUT_VARIABLE _dir ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
33 file(TO_CMAKE_PATH "${_dir}" __dir)
34 find_path(KDE4_ICON_DIR oxygen PATHS
37 message(STATUS "using oxygen application icons from ${KDE4_ICON_DIR}")
39 set (KDE4_ICON_DIR ${CMAKE_INSTALL_PREFIX}/share/icons)
42 macro_optional_find_package(Boost)
43 macro_log_feature(Boost_FOUND "boost" "Boost C++ Libraries" "http://www.boost.org" TRUE "1.33.1" "Required by several critical KDEPIM apps.")
45 macro_display_feature_log()
46 endif(NOT Boost_FOUND)
49 find_package(QGpgme REQUIRED)
51 add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DHAVE_CONFIG_H=1)
53 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${QT_QTDBUS_INCLUDE_DIR} )
55 include (kleopatra/ConfigureChecks.cmake)
57 add_subdirectory(libkleo)
59 find_path(TOPOLOGICAL_SORT_DIR NAMES boost/graph/topological_sort.hpp PATHS ${Boost_INCLUDE_DIRS})
60 macro_log_feature(TOPOLOGICAL_SORT_DIR "Boost Topological Sort" "Missing Boost header topological.h" "http://www.boost.org/" FALSE "" "Necessary to build kleopatra")
61 if(TOPOLOGICAL_SORT_DIR)
62 macro_optional_add_subdirectory(kleopatra)
63 endif(TOPOLOGICAL_SORT_DIR)
66 # regular case, build everything
68 find_package(Akonadi REQUIRED)
70 if ( NOT EXISTS ${CMAKE_SOURCE_DIR}/libkdepim/kdepim_export.h )
71 message ( FATAL_ERROR "libkdepim directory not found" ) # needed for Kode to compile correctly
72 endif ( NOT EXISTS ${CMAKE_SOURCE_DIR}/libkdepim/kdepim_export.h )
73 find_package(Kode REQUIRED)
74 find_package(ZLIB REQUIRED)
75 find_package(Strigi REQUIRED)
79 #X11_Xscreensaver discovery is done by FindX11
80 macro_log_feature(X11_Xscreensaver_FOUND "X11 screensaver extension" "X Window Screen Saver Development Library" "http://xorg.freedesktop.org" FALSE "" "Required for building the KTimeTracker Program")
83 # uncomment the following block for 4.3 in order to enable kitchensync
85 # set(OPENSYNC_MIN_VERSION 0.38)
86 # macro_optional_find_package(OpenSync)
87 # 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.")
88 # macro_optional_find_package(GLIB2)
89 # 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.")
92 macro_optional_find_package(GNOKII)
93 macro_bool_to_01(GNOKII_FOUND HAVE_GNOKII_H)
94 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")
96 macro_optional_find_package(Soprano)
97 macro_log_feature(Soprano_FOUND "Soprano" "Semantic Desktop Storing" "" FALSE "" "Soprano is needed for Nepomuk")
99 macro_optional_find_package(Nepomuk)
100 macro_log_feature(Nepomuk_FOUND "Nepomuk" "Nepomuk" "http://www.kde.org" FALSE "" "For adding desktop-wide tagging support to kmail")
102 add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
104 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDEPIMLIBS_INCLUDE_DIRS} ${KDE4_INCLUDES} ${QT_QTDBUS_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/libkdepim/)
106 include (kleopatra/ConfigureChecks.cmake)
108 set(libknotesresources_SRCS
109 ${CMAKE_SOURCE_DIR}/knotes/resourcemanager.cpp
110 ${CMAKE_SOURCE_DIR}/knotes/resourcenotes.cpp
111 ${CMAKE_SOURCE_DIR}/knotes/resourcelocal.cpp
112 ${CMAKE_SOURCE_DIR}/knotes/resourcelocalconfig.cpp
115 set(libknoteseditor_SRCS
116 ${CMAKE_SOURCE_DIR}/knotes/knoteedit.cpp
120 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttView.cpp
121 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewEventItem.cpp
122 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewItem.cpp
123 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewItemDrag.cpp
124 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewSubwidgets.cpp
125 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewSummaryItem.cpp
126 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewTaskItem.cpp
127 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewTaskLink.cpp
128 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttViewTaskLinkGroup.cpp
129 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttMinimizeSplitter.cpp
130 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttSemiSizingControl.cpp
131 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttSizingControl.cpp
132 ${CMAKE_SOURCE_DIR}/kdgantt1/KDGanttXMLTools.cpp
136 add_subdirectory(kode)
137 macro_optional_add_subdirectory(akonadi)
138 endif(BUILD_EVERYTHING)
139 add_subdirectory(libkdepim)
140 add_subdirectory(kontactinterfaces)
143 find_path(TOPOLOGICAL_SORT_DIR NAMES boost/graph/topological_sort.hpp PATHS ${Boost_INCLUDE_DIRS})
144 macro_log_feature(TOPOLOGICAL_SORT_DIR "Boost Topological Sort" "Missing Boost header topological.h" "http://www.boost.org/" FALSE "" "Necessary to build kleopatra")
145 if(TOPOLOGICAL_SORT_DIR)
146 macro_optional_add_subdirectory(kleopatra)
147 endif(TOPOLOGICAL_SORT_DIR)
148 add_subdirectory(libkleo)
151 add_subdirectory(libkpgp)
152 add_subdirectory(libksieve)
153 add_subdirectory(mimelib)
154 add_subdirectory(icons)
155 macro_optional_add_subdirectory(akregator)
157 macro_optional_add_subdirectory(knode)
158 endif(BUILD_EVERYTHING)
159 macro_optional_add_subdirectory(kjots)
162 set(KMAIL_SUPPORTED TRUE)
163 add_definitions(-DKMAIL_SUPPORTED)
164 message(STATUS "KMail support enabled.")
165 macro_optional_add_subdirectory(kmail)
167 set(KMAIL_SUPPORTED FALSE)
168 message(STATUS "KMail support DISABLED (QGPGME not found).")
171 macro_optional_add_subdirectory(kalarm)
172 macro_optional_add_subdirectory(kaddressbook)
173 # macro_optional_add_subdirectory(kcontactmanager)
176 set(KTIMETRACKER_SUPPORTED TRUE)
177 add_definitions(-DKTIMETRACKER_SUPPORTED)
178 message(STATUS "KTimeTracker support enabled.")
179 macro_optional_add_subdirectory(ktimetracker)
181 set(KTIMETRACKER_SUPPORTED FALSE)
182 message(STATUS "KTimeTracker support DISABLED (non-X11 target).")
185 add_subdirectory(kdgantt1)
187 macro_optional_add_subdirectory(strigi-analyzer)
189 if(QGPGME_FOUND AND KMAIL_SUPPORTED)
190 macro_optional_add_subdirectory(kmailcvt)
191 message(STATUS "KMailCVT support enabled.")
192 else(QGPGME_FOUND AND KMAIL_SUPPORTED)
193 message(STATUS "KMailCVT support DISABLED (because KMail support is disabled).")
194 endif(QGPGME_FOUND AND KMAIL_SUPPORTED)
195 macro_optional_add_subdirectory(knotes)
196 macro_optional_add_subdirectory(console)
198 if(QGPGME_FOUND AND KMAIL_SUPPORTED)
199 macro_optional_add_subdirectory(korganizer)
200 message(STATUS "KOrganizer support enabled.")
201 else(QGPGME_FOUND AND KMAIL_SUPPORTED)
202 message(STATUS "KOrganizer support DISABLED (because KMail support is disabled).")
203 endif(QGPGME_FOUND AND KMAIL_SUPPORTED)
206 macro_optional_add_subdirectory(ksendemail)
207 message(STATUS "KSendEmail support enabled.")
208 else(KMAIL_SUPPORTED)
209 message(STATUS "KSendEmail support DISABLED (because KMail support is disabled).")
210 endif(KMAIL_SUPPORTED)
213 #enable kmobiletools 4.3 if there is interest
214 # set(KMOBILETOOLS_SUPPORTED TRUE)
215 # add_definitions(-DKMOBILETOOLS_SUPPORTED)
216 # message(STATUS "KMobileTools support enabled.")
217 # macro_optional_add_subdirectory(kmobiletools)
218 set(KMOBILETOOLS_SUPPORTED FALSE)
220 set(KPILOT_SUPPORTED TRUE)
221 add_definitions(-DKPILOT_SUPPORTED)
222 message(STATUS "KPilot support enabled.")
223 macro_optional_add_subdirectory(kpilot)
225 # if(OPENSYNC_FOUND AND GLIB2_FOUND)
226 # set(KITCHENSYNC_SUPPORTED TRUE)
227 # add_definitions(-DKITCHENSYNC_SUPPORTED)
228 # message(STATUS "KitchenSync support enabled.")
229 # macro_optional_add_subdirectory(kitchensync)
230 # else(OPENSYNC_FOUND AND GLIB2_FOUND)
231 # set(KITCHENSYNC_SUPPORTED FALSE)
232 # if(NOT OPENSYNC_FOUND)
233 # message(STATUS "KitchenSync support disabled (OpenSync not found).")
234 # endif(NOT OPENSYNC_FOUND)
235 # if(NOT GLIB2_FOUND)
236 # message(STATUS "KitchenSync support disabled (GLIB not found).")
237 # endif(NOT GLIB2_FOUND)
238 # endif(OPENSYNC_FOUND AND GLIB2_FOUND)
239 set(KITCHENSYNC_SUPPORTED FALSE)
241 set(KMOBILETOOLS_SUPPORTED FALSE)
242 message(STATUS "KMobileTools support DISABLED (Windows target).")
243 set(KPILOT_SUPPORTED FALSE)
244 message(STATUS "KPilot support DISABLED (Windows target).")
245 set(KITCHENSYNC_SUPPORTED FALSE)
246 message(STATUS "KitchenSync support DISABLED (Windows target).")
249 add_subdirectory(akonadiconsole)
250 #enable korn in 4.3 if there is interest
251 # macro_optional_add_subdirectory(korn)
252 add_subdirectory(kresources)
253 macro_optional_add_subdirectory(kontact)
256 add_subdirectory(wizards)
259 add_subdirectory(cmake)
261 add_subdirectory(plugins)
265 macro_optional_add_subdirectory(doc)
266 macro_display_feature_log()