#################################################
#
#  (C) 2017 Slávek Banko
#  slavek (DOT) banko (AT) axis.cz
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

add_subdirectory( kcmaudiocd )
add_subdirectory( plugins )


include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_BINARY_DIR}/libkcddb
  ${CMAKE_SOURCE_DIR}/libkcddb
  ${CMAKE_SOURCE_DIR}/kscd
  ${TQT_INCLUDE_DIRS}
  ${TDE_INCLUDE_DIR}
  ${CDPARANOIA_INCLUDE_DIR}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
  ${ARTSC_LIBRARY_DIRS}
)


##### tdeio_audiocd (module) ####################

tde_add_kpart( tdeio_audiocd
  SOURCES
    audiocd.cpp
  LINK
    tdeio-shared ${CDPARANOIA_LIBRARIES}
    kcddb-shared kcompactdisc-static workman-static
    audiocdplugins-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


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

install( FILES audiocd.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES audiocd.upd DESTINATION ${DATA_INSTALL_DIR}/tdeconf_update )
install( PROGRAMS upgrade-metadata.sh DESTINATION ${DATA_INSTALL_DIR}/tdeconf_update )
