
set(libknewstickercommon_SRCS 
	${CMAKE_SOURCE_DIR}/knewsticker/common/newsiconmgr.cpp 
	${CMAKE_SOURCE_DIR}/knewsticker/common/xmlnewsaccess.cpp 
	${CMAKE_SOURCE_DIR}/knewsticker/common/configaccess.cpp 
	${CMAKE_SOURCE_DIR}/knewsticker/common/newsengine.cpp
	)


add_subdirectory( common ) 
add_subdirectory( knewstickerstub ) 

include_directories( ${CMAKE_SOURCE_DIR}/knewsticker/common ${PLASMA_INCLUDE_DIR} )

add_definitions ( -DQT3_SUPPORT -DQT3_SUPPORT_WARNINGS)

########### next target ###############

set(knewsticker_panelapplet_PART_SRCS ${libknewstickercommon_SRCS}
   newsscroller.cpp 
   knewsticker.cpp 
   knewstickerconfig.cpp 
   newssourcedlgimpl.cpp )



kde4_add_ui3_files(knewsticker_panelapplet_PART_SRCS newssourcedlg.ui )

kde4_add_ui_files(knewsticker_panelapplet_PART_SRCS knewstickerconfigwidget.ui)

kde4_add_plugin(knewsticker_panelapplet ${knewsticker_panelapplet_PART_SRCS})


target_link_libraries(knewsticker_panelapplet ${KDE4_KDE3SUPPORT_LIBS} ${QT_QTXML_LIBRARY} kickermain  ${KDE4_KNOTIFYCONFIG_LIBS})

install(TARGETS knewsticker_panelapplet  DESTINATION ${PLUGIN_INSTALL_DIR})


########### install files ###############

install( FILES knewsticker-standalone.desktop  DESTINATION ${XDG_APPS_INSTALL_DIR})
install( FILES knewsticker.notifyrc  DESTINATION ${DATA_INSTALL_DIR}/knewsticker)
install( FILES knewsticker.desktop  DESTINATION ${DATA_INSTALL_DIR}/kicker/applets)
install( FILES knewsticker.upd  DESTINATION ${KCONF_UPDATE_INSTALL_DIR})
install( PROGRAMS knt-0.1-0.2.pl  DESTINATION ${KCONF_UPDATE_INSTALL_DIR})
kde4_install_icons( ${ICON_INSTALL_DIR}   )
