include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
  ${GSTREAMER_INCLUDE_DIRS}
  ${GSTREAMER_PLUGIN_INCLUDE_DIRS}
  ${GSTREAMER_VIDEO_INCLUDE_DIRS}
  ${CMAKE_SOURCE_DIR}/kaffeine/src/player-parts/kaffeine-part
  ${CMAKE_SOURCE_DIR}/kaffeine/src
)

link_directories(
  ${TQT_LIBRARY_DIRS}
  ${TDE_LIB_DIR}
  ${GSTREAMER_LIBRARY_DIRS}
  ${GSTREAMER_PLUGIN_LIBRARY_DIRS}
  ${GSTREAMER_VIDEO_LIBRARY_DIRS}
)


##### libgstreamerpart (kpart)

tde_add_kpart( libgstreamerpart AUTOMOC

  SOURCES
        gstreamer_part.cpp
        video.cpp
        timer.cpp
        videosettings.cpp
        gstreamerconfig.cpp
  LINK
     tdecore-shared
     tdeui-shared
     tdeio-shared
     tdeparts-shared
     kaffeinepart-shared
     ${GSTREAMER_LIBRARIES}
     ${GSTREAMER_PLUGIN_LIBRARIES}
     ${GSTREAMER_VIDEO_LIBRARIES}

  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### other data

tde_create_translated_desktop(
    SOURCE gstreamer_part.desktop
    DESTINATION ${SERVICES_INSTALL_DIR}
    PO_DIR kaffeine-desktops
)

install(
    FILES gstreamer_part.rc
    DESTINATION ${DATA_INSTALL_DIR}/gstreamerpart
)

install(
    FILES gstreamer.png
    DESTINATION ${ICON_INSTALL_DIR}/hicolor/16x16/apps
)
