2 # Generate config-kstandarddirs.h
3 configure_file(config-kstandarddirs.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kstandarddirs.h )
6 configure_file(kdefakes.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdefakes.h )
8 # Generate kdeversion.h
9 configure_file(util/kdeversion.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdeversion.h )
11 # Configure checks for network/ but also for netsupp.*
12 include(network/ConfigureChecks.cmake)
13 configure_file(network/config-network.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/network/config-network.h )
14 include_directories( ${CMAKE_CURRENT_BINARY_DIR}/network )
15 include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/sonnet/ )
17 include_directories( ${KDE4_KDECORE_INCLUDES} )
18 include_directories( ${ZLIB_INCLUDE_DIR} )
19 include_directories( ${QT_INCLUDES} )
21 # kdecore_OPTIONAL_SRCS is used to collect source files
22 # which are not always compiled into kdecore
23 # if it's used, *always* append to it
24 set(kdecore_OPTIONAL_SRCS)
25 # same for optional libs
26 set(kdecore_OPTIONAL_LIBS)
29 set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${KDEWIN32_LIBRARIES})
32 # Needed for the kdatetime test in release mode
34 add_definitions(-DCOMPILING_TESTS)
35 endif(KDE4_BUILD_TESTS)
37 # compile bzip2 support if available
39 include_directories(${BZIP2_INCLUDE_DIR})
40 set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS} compression/kbzip2filter.cpp )
41 set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${BZIP2_LIBRARIES})
44 # compile Gettext support if available
46 include_directories(${LIBINTL_INCLUDE_DIR})
47 set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${LIBINTL_LIBRARIES})
50 if (HAVE_RESOLV_LIBRARY)
51 set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} resolv)
52 endif (HAVE_RESOLV_LIBRARY)
55 set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS}
56 kernel/kkernel_mac.cpp
58 set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${CARBON_LIBRARY})
62 set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS}
63 kernel/kkernel_win.cpp
64 kernel/ktoolinvocation_win.cpp
65 kernel/kstandarddirs_win.cpp
66 network/klocalsocket_win.cpp
69 util/kmacroexpander_win.cpp
73 set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS}
81 set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS}
82 kernel/ktoolinvocation_x11.cpp
83 kernel/kstandarddirs_unix.cpp
84 network/k3httpproxysocketdevice.cpp
86 network/k3sockssocketdevice.cpp
87 network/klocalsocket_unix.cpp
92 util/kmacroexpander_unix.cpp
98 add_subdirectory( kconfig_compiler )
99 add_subdirectory( tests )
100 add_subdirectory( sonnet/tests )
102 ########### next target ###############
106 kde4_add_library(kdefakes SHARED fakes.c)
107 set_target_properties(kdefakes PROPERTIES VERSION ${KDE_NON_GENERIC_LIB_VERSION} SOVERSION ${KDE_NON_GENERIC_LIB_SOVERSION})
109 target_link_libraries(kdefakes m )
110 endif (NOT HAVE_TRUNC)
111 install(TARGETS kdefakes EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} )
117 ########### next target ###############
120 compression/kgzipfilter.cpp
121 compression/kfilterbase.cpp
122 compression/kfilterdev.cpp
124 config/kconfigbase.cpp
125 config/kconfiggroup.cpp
126 config/kconfigbackend.cpp
127 config/kconfigini.cpp
128 config/kdesktopfile.cpp
129 config/ksharedconfig.cpp
130 config/kcoreconfigskeleton.cpp
131 date/kcalendarsystem.cpp
132 date/kcalendarsystemgregorian.cpp
133 date/kcalendarsystemhijri.cpp
134 date/kcalendarsystemhebrew.cpp
135 date/kcalendarsystemjalali.cpp
138 date/ksystemtimezone.cpp
139 date/ktzfiletimezone.cpp
142 io/kdebugdbusiface.cpp
147 io/ktemporaryfile.cpp
149 jobs/kcompositejob.cpp
151 jobs/kjobuidelegate.cpp
152 jobs/kjobtrackerinterface.cpp
153 kernel/kauthorized.cpp
154 kernel/kautostart.cpp
155 kernel/kaboutdata.cpp
156 kernel/kcmdlineargs.cpp
158 kernel/kcomponentdata.cpp
159 kernel/kstandarddirs.cpp
160 kernel/ktoolinvocation.cpp
161 services/kfoldermimetype.cpp
162 services/kmimetypefactory.cpp
163 services/kmimemagicrule.cpp
164 services/kmimetypetrader.cpp
165 services/kmimetype.cpp
166 services/kservice.cpp
167 services/kserviceaction.cpp
168 services/kservicefactory.cpp
169 services/kservicegroup.cpp
170 services/kservicegroupfactory.cpp
171 services/kserviceoffer.cpp
172 services/kservicetype.cpp
173 services/kservicetypefactory.cpp
174 services/kservicetypeprofile.cpp
175 services/kservicetypetrader.cpp
176 services/ktraderparse.cpp
177 services/ktraderparsetree.cpp
180 services/kplugininfo.cpp
183 sonnet/spellerplugin.cpp
187 sonnet/backgroundchecker.cpp
188 sonnet/backgroundengine.cpp
190 network/k3socketdevice.cpp # must be before the rest of network/, for enable-final
191 network/k3bufferedsocket.cpp
192 network/k3clientsocketbase.cpp
193 network/k3datagramsocket.cpp
194 network/k3resolver.cpp
195 network/k3resolvermanager.cpp
196 network/k3resolverworkerbase.cpp
197 network/k3resolverstandardworkers.cpp
198 network/k3reverseresolver.cpp
199 network/k3serversocket.cpp
200 network/k3socketaddress.cpp
201 network/k3socketbase.cpp
202 network/k3streamsocket.cpp
203 network/k3socketbuffer.cpp
204 network/klocalsocket.cpp
205 network/ksocketfactory.cpp
206 network/ktcpsocket.cpp
207 localization/kcatalog.cpp
208 localization/kcharsets.cpp
209 localization/kencodingdetector.cpp
210 localization/guess_ja.cpp
211 localization/kencodingprober.cpp
212 localization/probers/CharDistribution.cpp
213 localization/probers/ChineseGroupProber.cpp
214 localization/probers/JapaneseGroupProber.cpp
215 localization/probers/JpCntx.cpp
216 localization/probers/LangBulgarianModel.cpp
217 localization/probers/LangCyrillicModel.cpp
218 localization/probers/LangGreekModel.cpp
219 localization/probers/LangHebrewModel.cpp
220 localization/probers/LangHungarianModel.cpp
221 localization/probers/LangThaiModel.cpp
222 localization/probers/UnicodeGroupProber.cpp
223 localization/probers/nsBig5Prober.cpp
224 localization/probers/nsCharSetProber.cpp
225 localization/probers/nsEUCJPProber.cpp
226 localization/probers/nsEUCKRProber.cpp
227 localization/probers/nsEUCTWProber.cpp
228 localization/probers/nsEscCharsetProber.cpp
229 localization/probers/nsEscSM.cpp
230 localization/probers/nsGB2312Prober.cpp
231 localization/probers/nsHebrewProber.cpp
232 localization/probers/nsLatin1Prober.cpp
233 localization/probers/nsMBCSGroupProber.cpp
234 localization/probers/nsMBCSSM.cpp
235 localization/probers/nsSBCSGroupProber.cpp
236 localization/probers/nsSBCharSetProber.cpp
237 localization/probers/nsSJISProber.cpp
238 localization/probers/nsUniversalDetector.cpp
239 localization/klocale.cpp
240 localization/klocalizedstring.cpp
241 localization/ktranslit.cpp
242 localization/kuitsemantics.cpp
243 localization/kuitformats.cpp
244 localization/common_helpers.cpp
246 sycoca/ksycocadict.cpp
247 sycoca/ksycocaentry.cpp
248 sycoca/ksycocafactory.cpp
249 sycoca/kprotocolinfo.cpp
250 sycoca/kprotocolinfofactory.cpp
254 text/kstringhandler.cpp
258 util/klauncher_iface.cpp
261 util/kmacroexpander.cpp
262 util/kpluginfactory.cpp
263 util/kpluginloader.cpp
266 util/krandomsequence.cpp
268 ${kdecore_OPTIONAL_SRCS}
272 if (NOT Q_WS_X11 AND NOT Q_WS_QWS)
273 add_definitions(-DNO_DISPLAY)
274 endif (NOT Q_WS_X11 AND NOT Q_WS_QWS)
276 kde4_add_library(kdecore SHARED ${kdecore_LIB_SRCS})
278 target_link_libraries(kdecore ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${ZLIB_LIBRARY} ${kdecore_OPTIONAL_LIBS})
281 set(kdecore_LINK_INTERFACE_LIBRARIES ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${KDEWIN32_LIBRARIES})
284 set(kdecore_LINK_INTERFACE_LIBRARIES ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${CARBON_LIBRARY})
286 set(kdecore_LINK_INTERFACE_LIBRARIES ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} )
290 target_link_libraries(kdecore LINK_INTERFACE_LIBRARIES ${kdecore_LINK_INTERFACE_LIBRARIES} )
292 set_target_properties(kdecore PROPERTIES
293 VERSION ${KDE_NON_GENERIC_LIB_VERSION}
294 SOVERSION ${KDE_NON_GENERIC_LIB_SOVERSION}
298 install(TARGETS kdecore EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
300 ########### next target ###############
302 configure_file(all_languages.desktop ${CMAKE_CURRENT_BINARY_DIR}/all_languages @ONLY)
304 kde4_add_executable(kde4-config NOGUI kde-config.cpp )
306 target_link_libraries(kde4-config ${KDE4_KDECORE_LIBS} )
308 install(TARGETS kde4-config ${INSTALL_TARGETS_DEFAULT_ARGS} )
311 ########### next target ###############
314 kde4_add_executable(kcmdwrapper NOGUI io/kcmdwrapper.cpp )
316 target_link_libraries(kcmdwrapper kernel32 shell32 )
318 install(TARGETS kcmdwrapper DESTINATION ${LIBEXEC_INSTALL_DIR} )
321 ########### next target ###############
323 # kjs hash stuff for transcript plugin
324 set( CREATE_HASH_TABLE ${CMAKE_SOURCE_DIR}/kjs/create_hash_table )
327 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ktranscript.lut.h
328 COMMAND ${PERL_EXECUTABLE} ${CREATE_HASH_TABLE}
329 ${CMAKE_CURRENT_SOURCE_DIR}/localization/ktranscript.cpp
330 > ${CMAKE_CURRENT_BINARY_DIR}/ktranscript.lut.h
331 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/localization/ktranscript.cpp
334 # the transcript plugin
335 set( ktranscript_LIB_SRCS
336 localization/ktranscript.cpp
337 localization/common_helpers.cpp
340 kde4_add_plugin( ktranscript ${ktranscript_LIB_SRCS} )
342 target_link_libraries( ktranscript kjs ${QT_QTCORE_LIBRARY} )
345 if(KDE4_ENABLE_FINAL)
346 macro_add_file_dependencies(${CMAKE_CURRENT_BINARY_DIR}/ktranscript_final_cpp.cpp ${CMAKE_CURRENT_BINARY_DIR}/ktranscript.lut.h)
347 else(KDE4_ENABLE_FINAL)
348 macro_add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/localization/ktranscript.cpp ${CMAKE_CURRENT_BINARY_DIR}/ktranscript.lut.h)
349 endif(KDE4_ENABLE_FINAL)
351 install( TARGETS ktranscript DESTINATION ${PLUGIN_INSTALL_DIR} )
353 ########### install files ###############
354 install( FILES ${CMAKE_CURRENT_BINARY_DIR}/all_languages DESTINATION ${LOCALE_INSTALL_DIR} )
355 install( FILES kdebug.areas kdebugrc DESTINATION ${CONFIG_INSTALL_DIR} )
358 compression/kfilterbase.h
359 compression/kfilterdev.h
360 config/conversion_check.h
362 #config/kconfigbackend.h re-enable post-API review and implementation (4.2?)
364 config/kconfiggroup.h
365 config/kdesktopfile.h
366 config/ksharedconfig.h
367 config/kcoreconfigskeleton.h
368 date/kcalendarsystem.h
370 date/ksystemtimezone.h
372 date/ktzfiletimezone.h
384 jobs/kjobuidelegate.h
385 jobs/kjobtrackerinterface.h
389 kernel/kcmdlineargs.h
391 kernel/kcomponentdata.h
392 kernel/kstandarddirs.h
393 kernel/ktoolinvocation.h
394 network/k3bufferedsocket.h
395 network/k3clientsocketbase.h
396 network/k3datagramsocket.h
397 network/k3httpproxysocketdevice.h
399 network/k3reverseresolver.h
400 network/k3serversocket.h
401 network/k3socketaddress.h
402 network/k3socketbase.h
403 network/k3socketdevice.h
405 network/k3sockssocketdevice.h
406 network/k3streamsocket.h
407 network/klocalsocket.h
408 network/ksocketfactory.h
410 services/kmimetypetrader.h
412 services/kserviceaction.h
413 services/kservicegroup.h
414 #services/kservicefactory.h: do not install, internal API
415 services/kservicetype.h
416 #services/kservicetypefactory.h: do not install, internal API
417 services/kservicetypeprofile.h
418 services/kservicetypetrader.h
419 #services/kserviceoffer.h: do not install, internal API
420 services/kplugininfo.h
421 localization/kcharsets.h
422 localization/kencodingdetector.h
423 localization/kencodingprober.h
424 localization/klocale.h
425 localization/klocalizedstring.h
426 sycoca/kprotocolinfo.h
428 sycoca/ksycocaentry.h
432 text/kstringhandler.h
436 util/kgenericfactory.h
437 util/kgenericfactory.tcc
438 util/klauncher_iface.h
441 util/kmacroexpander.h
443 util/kpluginfactory.h
447 util/krandomsequence.h
453 ${CMAKE_CURRENT_BINARY_DIR}/kdefakes.h
454 ${CMAKE_CURRENT_BINARY_DIR}/kdeversion.h
455 DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel
458 install( FILES sonnet/backgroundchecker.h sonnet/speller.h sonnet/globals.h
459 DESTINATION ${INCLUDE_INSTALL_DIR}/sonnet COMPONENT Devel)
462 config/kconfigbackend.desktop
463 services/kplugininfo.desktop
464 sonnet/sonnetspeller.desktop
465 DESTINATION ${SERVICETYPES_INSTALL_DIR}