#################################################
#
#  (C) 2010-2011 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

include( ConfigureChecks.cmake )

add_subdirectory( daapreader )
add_subdirectory( mongrel )

include_directories(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_BINARY_DIR}
  ${CMAKE_BINARY_DIR}/amarok/src
  ${CMAKE_BINARY_DIR}/amarok/src/amarokcore
  ${CMAKE_SOURCE_DIR}/amarok/src
  ${CMAKE_SOURCE_DIR}/amarok/src/amarokcore
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
)


##### other data ################################

install( FILES
    amarok_daap-mediadevice.desktop
  DESTINATION ${SERVICES_INSTALL_DIR} )

install( PROGRAMS
    amarok_daapserver.rb
  DESTINATION ${BIN_INSTALL_DIR} )

install( FILES
    codes.rb
  DESTINATION ${DATA_INSTALL_DIR}/amarok/ruby_lib )


##### libamarok_daap-mediadevice (module) #######

tde_add_kpart( libamarok_daap-mediadevice AUTOMOC
  SOURCES
    addhostbase.ui daapclient.cpp daapserver.cpp proxy.cpp
  LINK daapreader-static amarok-shared kdnssd-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
  DEPENDENCIES amarokcore-static
)
