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}
)


##### kigpart (static)

tde_add_library( kigpart STATIC_PIC AUTOMOC

  SOURCES
        kig_document.cpp
        kig_part.cpp
        kig_view.cpp
        kig_commands.cpp
  LINK
     tdeprint-shared
     tdeio-shared
)


##### kig (executable)

tde_add_executable( kig AUTOMOC

  SOURCES
        main.cpp
        kig.cpp
  LINK
     tdecore-shared
     tdeui-shared
     tdeio-shared
     tdeparts-shared

  DESTINATION ${BIN_INSTALL_DIR}
)


##### icons

tde_install_icons( )


##### other data

install(
    FILES kigui.rc kigpartui.rc
    DESTINATION ${DATA_INSTALL_DIR}/kig
)

tde_create_translated_desktop(
    SOURCE kig.desktop
    PO_DIR kig-desktops
)

tde_create_translated_desktop(
    SOURCE kig_part.desktop
    DESTINATION ${SERVICES_INSTALL_DIR}
    PO_DIR kig-desktops
)
