add_subdirectory( common-dialogs    )
add_subdirectory( kvt-core          )
add_subdirectory( query-dialogs     )
add_subdirectory( docprop-dialogs   )
add_subdirectory( entry-dialogs     )
add_subdirectory( statistik-dialogs )
add_subdirectory( pics              )
add_subdirectory( examples          )
#add_subdirectory( tools )

include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
  ${CMAKE_CURRENT_SOURCE_DIR}/kvt-core
  ${CMAKE_BINARY_DIR}/kvoctrain/kvoctrain/docprop-dialogs
  ${CMAKE_BINARY_DIR}/kvoctrain/kvoctrain/entry-dialogs
  ${CMAKE_BINARY_DIR}/kvoctrain/kvoctrain/common-dialogs
  ${CMAKE_BINARY_DIR}/kvoctrain/kvoctrain/query-dialogs
)

link_directories(
  ${TQT_LIBRARY_DIRS}
  ${TDE_LIB_DIR}
)


##### kvoctrain (executable)

tde_add_executable( kvoctrain AUTOMOC

  SOURCES
        kva_io.cpp
        kvoctrain.cpp
        kvoctrainview.cpp
        main.cpp kva_init.cpp
        kva_config.cpp
        kva_header.cpp
        kva_clip.cpp
        kva_query.cpp
        kvoctraintable.cpp
        kvoctraintableitem.cpp
        kvtnewstuff.cpp
  LINK
     tdecore-shared
     tdeui-shared
     tdeio-shared
     tdeprint-shared
     tdenewstuff-shared
     querydlg-static
     docpropdlg-static
     kvtxml-static
     kvoctraincore-shared
     entrydlg-static
     statdlg-static
     commondlg-static
  
  DEPENDENCIES
     querydlg-static
     docpropdlg-static
     entrydlg-static
     commondlg-static

  DESTINATION ${BIN_INSTALL_DIR}
)


##### spotlight2kvtml (executable)

tde_add_executable( spotlight2kvtml AUTOMOC

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

  DESTINATION ${BIN_INSTALL_DIR}
)


##### other data

tde_create_translated_desktop(
    SOURCE x-kvtml.desktop
    DESTINATION ${MIME_INSTALL_DIR}/text
    PO_DIR kvoctrain-desktops
)

install(
    FILES kvoctrainui.rc
    DESTINATION ${DATA_INSTALL_DIR}/kvoctrain
)

tde_create_translated_desktop(
    SOURCE kvoctrain.desktop
    PO_DIR kvoctrain-desktops
)

install(
    FILES kvoctrainrc
    DESTINATION ${CONFIG_INSTALL_DIR}
)
