remove_definitions(-DKDE_DEFAULT_DEBUG_AREA=5600) #remove kontact debug area
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5602)

if(QGPGME_FOUND)
  if(BUILD_kmail)
    add_subdirectory( kmail )
  endif(BUILD_kmail)
  if (BUILD_kmail AND BUILD_korganizer)
    add_subdirectory( korganizer )
  endif (BUILD_kmail AND BUILD_korganizer)
  add_subdirectory( summary )
  add_subdirectory( specialdates )
  add_subdirectory( planner )
endif(QGPGME_FOUND)
if (BUILD_knotes)
  add_subdirectory( knotes )
endif (BUILD_knotes)
if (BUILD_knode)
  add_subdirectory( knode )
endif (BUILD_knode)
if (BUILD_kjots)
  add_subdirectory( kjots )
endif (BUILD_kjots)
if (BUILD_akregator)
  add_subdirectory( akregator )
endif (BUILD_akregator)
if(BUILD_ktimetracker)
  add_subdirectory( ktimetracker )
endif(BUILD_ktimetracker)
if(BUILD_kaddressbook)
  add_subdirectory(kaddressbook)
endif(BUILD_kaddressbook)


option(KONTACT_ENABLE_MIXEDMODE_SUMMARY_PLUGINS "Build the Special Dates and Planner plugins for Kontact." FALSE)

remove_definitions(-DKDE_DEFAULT_DEBUG_AREA=5600) #remove kontact debug area
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5602)

if(QGPGME_FOUND)
  if(BUILD_kmail)
    add_subdirectory( kmail )
  endif(BUILD_kmail)
  if (BUILD_kmail AND BUILD_korganizer)
    add_subdirectory( korganizer )
  endif (BUILD_kmail AND BUILD_korganizer)
  add_subdirectory( summary )
  if(KONTACT_ENABLE_MIXEDMODE_SUMMARY_PLUGINS)
    add_subdirectory( specialdates )
    add_subdirectory( planner )
  endif()
endif(QGPGME_FOUND)
if (BUILD_knotes)
  add_subdirectory( knotes )
endif (BUILD_knotes)
if (BUILD_knode)
  add_subdirectory( knode )
endif (BUILD_knode)
if (BUILD_kjots)
  add_subdirectory( kjots )
endif (BUILD_kjots)
if (BUILD_akregator)
  add_subdirectory( akregator )
endif (BUILD_akregator)
if(BUILD_ktimetracker)
  add_subdirectory( ktimetracker )
endif(BUILD_ktimetracker)
if(BUILD_kaddressbook)
  add_subdirectory(kaddressbook)
endif(BUILD_kaddressbook)


Disable the Special Dates and Planner plugins by default. A new option is introduced for kdepim 4.4.10: KONTACT_ENABLE_MIXEDMODE_SUMMARY_PLUGINS (default: disabled) This will prevent Kontact from starting twice when restoring the KDE session.
Disable the Special Dates and Planner plugins by default.
A new option is introduced for kdepim 4.4.10: KONTACT_ENABLE_MIXEDMODE_SUMMARY_PLUGINS (default: disabled)
This will prevent Kontact from starting twice when restoring the KDE session.

CCBUG: 185544
BUG: 263294
(and probably a few other Kontact bugs)

DO NOT BACKPORT. AFAIK, kontact from 4.6 is not affected.
