add_subdirectory( pics     )
add_subdirectory( examples )

include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
  ${CMAKE_SOURCE_DIR}/kwordquiz/icons
)

link_directories(
  ${TQT_LIBRARY_DIRS}
  ${TDE_LIB_DIR}
)


##### kwordquiz (executable)

tde_add_executable( kwordquiz AUTOMOC

  SOURCES
        dlglanguagebase.ui
        flashviewbase.ui
        multipleviewbase.ui
        qaviewbase.ui
        prefeditorbase.ui
        prefquizbase.ui
        dlgsortbase.ui
        dlgrcbase.ui
        prefcharacterbase.ui
        prefcardappearancebase.ui
        kwordquizprefs.cpp
        kwordquizview.cpp
        kwordquizdoc.cpp
        kwordquiz.cpp
        main.cpp
        qaview.cpp
        flashview.cpp
        multipleview.cpp
        wqquiz.cpp
        wqlistitem.cpp
        wqscore.cpp
        keduvocdata.cpp
        prefeditor.cpp
        prefquiz.cpp
        dlgsort.cpp
        dlgrc.cpp
        dlgspecchar.cpp
        kvtmlwriter.cpp
        dlglanguage.cpp
        wqprintdialogpage.cpp
        prefcharacter.cpp
        paukerreader.cpp
        wqlreader.cpp
        wqlwriter.cpp
        wqundo.cpp
        prefcardappearance.cpp
        kwqnewstuff.cpp
        prefs.kcfgc
  LINK
     tdecore-shared
     tdeui-shared
     tdeio-shared
     tdeprint-shared
     tdenewstuff-shared

  DESTINATION ${BIN_INSTALL_DIR}
)


##### other data

install(
    FILES kwordquizui.rc
    DESTINATION ${DATA_INSTALL_DIR}/kwordquiz
)

tde_create_translated_desktop(
    SOURCE eventsrc
    DESTINATION ${DATA_INSTALL_DIR}/kwordquiz
    PO_DIR kwordquiz-events
)

tde_create_translated_desktop(
    SOURCE kwordquiz.desktop
    PO_DIR kwordquiz-desktops
)

tde_create_translated_desktop(
    SOURCE x-kwordquiz.desktop
    DESTINATION ${MIME_INSTALL_DIR}/application
    PO_DIR kwordquiz-desktops
)

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

install(
    FILES kwordquizrc
    DESTINATION ${CONFIG_INSTALL_DIR}
)
