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

include_directories(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_SOURCE_DIR}/libtdepim
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
)

##### rsslocal (static) #########################

tde_add_library( rsslocal STATIC_PIC AUTOMOC
  SOURCES
    article.cpp document.cpp image.cpp textinput.cpp
    tools_p.cpp loader.cpp enclosure.cpp category.cpp
    feeddetector.cpp
)

tde_add_check_executable( testlibrss AUTOMOC
  SOURCES testlibrss.cpp
  LINK rsslocal-static ${TQT_LIBRARIES} tdeio-shared
)

set( TEST_DATA "${CMAKE_CURRENT_SOURCE_DIR}/test_data")

add_test( NAME TestLibRSS_0.91
  COMMAND testlibrss ${TEST_DATA}/rss091.xml
)

add_test( NAME TestLibRSS_CommentAPI
  COMMAND testlibrss ${TEST_DATA}/comment_api.xml
)

add_test( NAME TestLibRSS_DublinCore
  COMMAND testlibrss ${TEST_DATA}/dublincore.xml
)

add_test( NAME TestLibRSS_RDF
  COMMAND testlibrss ${TEST_DATA}/rdf.xml
)

add_test( NAME TestLibRSS_AtomSpec
  COMMAND testlibrss ${TEST_DATA}/atom_spec.xml
)
