# Project Needs a name ofcourse
project(plasma-weatherforecast)

#set(CMAKE_BACKWARDS_COMPATIBILITY 2.2)
 
# Find the required Libaries
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
#find_package(Plasma REQUIRED)
 
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
   ${CMAKE_SOURCE_DIR}
   ${CMAKE_BINARY_DIR}
   ${KDE4_INCLUDES}
   ${QT_QTTEST_INCLUDE_DIR}
   )
 
# We add our source code here
set(weather_SRCS 
	plasma-simpleweatherforecast.cpp
        config.cpp)

# Now make sure all files get to the right place
kde4_add_ui_files(weather_SRCS config.ui)
kde4_add_plugin(plasma_applet_simpleweatherforecast ${weather_SRCS})
target_link_libraries(plasma_applet_simpleweatherforecast 
${QT_QTXML_LIBRARY} ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})

# Build the tests
#kde4_add_unit_test( test_plasma_wifi test_plasma-wifi-signal.cpp )
#target_link_libraries( test_plasma_wifi plasma_applet_wifi_signal
#                      ${PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY} )
 
install(TARGETS plasma_applet_simpleweatherforecast
        DESTINATION ${PLUGIN_INSTALL_DIR})
 
install(FILES plasma-applet-simpleweatherforecast.desktop
        DESTINATION ${SERVICES_INSTALL_DIR})

install(FILES
    plasma-simpleweatherforecast.svg
    DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/default/widgets/)

