
# this works also for the weatherutils include dir, but should be done properly, Alex
include_directories(${PLASMACLOCK_INCLUDE_DIR})

if(KDE4_PLASMA_OPENGL_FOUND)
  message(STATUS "libplasma supports OpenGL applets")
else(KDE4_PLASMA_OPENGL_FOUND)
  message(STATUS "libplasma doesn't support OpenGL applets")
endif(KDE4_PLASMA_OPENGL_FOUND)

add_subdirectory(bball)
if(KDE4WORKSPACE_FOUND)
  add_subdirectory(binary-clock)
  add_subdirectory(fuzzy-clock)
  add_subdirectory(weather)
endif(KDE4WORKSPACE_FOUND)
add_subdirectory(blackboard)
add_subdirectory(bookmarks)
add_subdirectory(bubblemon)
add_subdirectory(calculator)
add_subdirectory(charselect)
add_subdirectory(comic)
add_subdirectory(fifteenPuzzle)
add_subdirectory(fileWatcher)
add_subdirectory(frame)
add_subdirectory(kolourpicker)
add_subdirectory(konqprofiles)
add_subdirectory(konsoleprofiles)
add_subdirectory(knowledgebase)
add_subdirectory(life)
add_subdirectory(luna)
add_subdirectory(magnifique)
add_subdirectory(microblog)
add_subdirectory(notes)
add_subdirectory(nowplaying)
if(LIBATTICA_FOUND)
  add_subdirectory(community)
  add_subdirectory(social-news)
endif(LIBATTICA_FOUND)
add_subdirectory(pastebin)
add_subdirectory(previewer)
add_subdirectory(rememberthemilk)
add_subdirectory(rssnow)
add_subdirectory(spellcheck)
add_subdirectory(showdashboard)
add_subdirectory(timer)

add_subdirectory(eyes)

add_subdirectory(unitconverter)
add_subdirectory(weatherstation)

if(QT_QTWEBKIT_FOUND)
  add_subdirectory(dict)
  add_subdirectory(news)
endif(QT_QTWEBKIT_FOUND)

if(PHONON_FOUND)
  add_subdirectory(mediaplayer)
endif(PHONON_FOUND)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/qalculate/cmake_modules)
macro_optional_find_package(Qalculate)
if ( QALCULATE_FOUND )
    macro_log_feature(QALCULATE_FOUND "Qalculate!" "Qalculate Library" "http://qalculate.sourceforge.net/" FALSE "" "Needed for building the Qalculate plasma applet")
    add_subdirectory(qalculate)
endif( QALCULATE_FOUND )

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/kdeobservatory/cmake/modules)
macro_optional_find_package(Qwt)
if ( Qwt5-Qt4_FOUND )
  add_subdirectory(kdeobservatory)
endif( Qwt5-Qt4_FOUND )

if(NOT WIN32)
  if(KDE4WORKSPACE_FOUND)
    add_subdirectory(lancelot)
  endif(KDE4WORKSPACE_FOUND)
  add_subdirectory(incomingmsg)
  add_subdirectory(leavenote)
  add_subdirectory(showdesktop)
  add_subdirectory(paste)
  add_subdirectory(plasmaboard)
  add_subdirectory(systemloadviewer)
endif(NOT WIN32)

if (Q_WS_X11)
   if (X11_Xrender_FOUND)
      set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/kimpanel/cmake)
      macro_optional_find_package(SCIM)
      macro_log_feature(SCIM_FOUND "SCIM headers" "Multibyte input widget" "http://www.scim-im.org" FALSE "1.4" "Needed for the kimpanel multibyte input Plasmoid")
      if (SCIM_FOUND)
         add_subdirectory(kimpanel)
      endif ( SCIM_FOUND)
   endif (X11_Xrender_FOUND)
endif (Q_WS_X11)

add_subdirectory(webslice)
