include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
  ${CMAKE_BINARY_DIR}/keduca/libkeduca
)

link_directories(
  ${TQT_LIBRARY_DIRS}
  ${TDE_LIB_DIR}
)


##### keduca (executable)

tde_add_executable( keduca AUTOMOC

  SOURCES
        main.cpp
        keduca.cpp
  LINK
     tdecore-shared
     tdeui-shared
     tdeio-shared
     tdeparts-shared
     keduca-static

  DESTINATION ${BIN_INSTALL_DIR}
)


##### libkeducapart (kpart)

tde_add_kpart( libkeducapart AUTOMOC

  SOURCES
        configdialogbase.ui
        keduca_part.cpp
        tderadioeduca.cpp
        kquestion.cpp
        kgroupeduca.cpp
        keducaview.cpp
        keducaprefs.cpp
        kcheckeduca.cpp
        settings.kcfgc
  LINK
     tdecore-shared
     tdeui-shared
     tdeio-shared
     tdeparts-shared
     keduca-static

  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### other data

install(
    FILES keducaui.rc keduca_partui.rc
    DESTINATION ${DATA_INSTALL_DIR}/keduca
)

install(
    FILES keduca.kcfg
    DESTINATION ${KCFG_INSTALL_DIR}
)

tde_create_translated_desktop(
    SOURCE keduca_part.desktop
    DESTINATION ${SERVICES_INSTALL_DIR}
    PO_DIR keduca-desktops
)
