project(kdesdk)

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )

# search packages used by KDE
find_package(KDE4 REQUIRED)
include (KDE4Defaults)
include (MacroLibrary)

# are these two really required ?
find_package(ZLIB REQUIRED)
if (APPLE)
   find_package(Carbon REQUIRED)
endif (APPLE)
find_package(KdepimLibs REQUIRED)
macro_optional_find_package(SVN)
macro_optional_find_package(LibXslt)
macro_optional_find_package(LibXml2)

add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT3_SUPPORT -DHAVE_CONFIG_H=1)
include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})


include (ConfigureChecks.cmake)
configure_file (config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )


#add_subdirectory(cervisia)
add_subdirectory(doc)
add_subdirectory(kapptemplate)
if(HAVE_FLEXLEXER_H)
  add_subdirectory(kbabel)
endif(HAVE_FLEXLEXER_H)
add_subdirectory(kbugbuster)
add_subdirectory(kcachegrind)
add_subdirectory(kdeaccounts-plugin)
add_subdirectory(kdepalettes)
add_subdirectory(kfile-plugins)
add_subdirectory(kioslave)
add_subdirectory(kmtrace)
#message(STATUS "remember to port kompare to editinterface")
MESSAGE(STATUS "Kompare from the branches/work/kompare/3-way-kompare will replace this version, so do not spend too much time on getting this version to work as it will be replaced.")
#add_subdirectory(kompare)
add_subdirectory(kprofilemethod)
message(STATUS "remember to port kspy to Qt4's metaobjects")
#add_subdirectory(kspy)
MESSAGE( STATUS "INFO: By default into old build system kstartpref was not compiled")
if(HAVE_LTDL_H)
	add_subdirectory(kstartperf)
endif(HAVE_LTDL_H)
add_subdirectory(kuiviewer)
message(STATUS "remember to port kunittest")
#add_subdirectory(kunittest)
message(STATUS "integrate antlr for poxml")
#add_subdirectory(poxml)
message(STATUS "remember to port scheck (check style)")
#add_subdirectory(scheck)
add_subdirectory(scripts)
if(HAVE_FLEXLEXER_H AND LIBXSLT_FOUND AND LIBXML2_FOUND)
   add_subdirectory(umbrello)
endif(HAVE_FLEXLEXER_H AND LIBXSLT_FOUND AND LIBXML2_FOUND)	
add_subdirectory( cmake )


