include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
  ${TDE_LIB_DIR}
)


##### kcm_kshowmailconfigaccounts (kpart)

tde_add_kpart( kcm_kshowmailconfigaccounts AUTOMOC

  SOURCES
        configaccounts.cpp
        accountsetupitem.cpp
        accountsetupdialog.cpp
        encryption.cpp
        tdewalletaccess.cpp
  LINK
     tdecore-shared
     tdeui-shared
     tdeio-shared
     tdewalletclient

  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kcm_kshowmailconfigactions (kpart)

tde_add_kpart( kcm_kshowmailconfigactions AUTOMOC

  SOURCES
        configactions.cpp
  LINK
     tdecore-shared
     tdeui-shared
     tdeio-shared

  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kcm_kshowmailconfigdisplay (kpart)

tde_add_kpart( kcm_kshowmailconfigdisplay AUTOMOC

  SOURCES
        configdisplay.cpp
  LINK
     tdecore-shared
     tdeui-shared

  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kcm_kshowmailconfigfilter (kpart)

tde_add_kpart( kcm_kshowmailconfigfilter AUTOMOC

  SOURCES
        configfilter.cpp
        senderlistdialog.cpp
        filtersetupitem.cpp
        filtersetupdialog.cpp
        filtercriteriawidget.cpp
        mailboxwizard.cpp
        mailboxwizardlistitem.cpp
  LINK
     tdecore-shared
     tdeui-shared
     tdeio-shared

  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kcm_kshowmailconfiggeneral (kpart)

tde_add_kpart( kcm_kshowmailconfiggeneral AUTOMOC

  SOURCES
        configgeneral.cpp
  LINK
     tdecore-shared
     tdeui-shared

  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kcm_kshowmailconfiglog (kpart)

tde_add_kpart( kcm_kshowmailconfiglog AUTOMOC

  SOURCES
        configlog.cpp
  LINK
     tdecore-shared
     tdeui-shared

  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kcm_kshowmailconfigspamcheck (kpart)

tde_add_kpart( kcm_kshowmailconfigspamcheck AUTOMOC

  SOURCES
        configspamcheck.cpp
        mailboxwizard.cpp
        mailboxwizardlistitem.cpp
  LINK
     tdecore-shared
     tdeui-shared
     tdeio-shared

  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### other data

file( GLOB _desktops RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.desktop )

tde_create_translated_desktop(
    SOURCE ${_desktops}
    DESTINATION ${SERVICES_INSTALL_DIR}
)
