project(runcommand)

find_package(KDE4 REQUIRED)
include(KDE4Defaults)

add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
   ${CMAKE_SOURCE_DIR}
   ${CMAKE_BINARY_DIR}
   ${KDE4_INCLUDES}
   )

set(runcommand_SRCS RunCommandApplet.cpp RunCommandItem.cpp)

add_subdirectory(locale)

kde4_add_ui_files(runcommand_SRCS ui/results.ui)
kde4_add_plugin(plasma_applet_runcommand ${runcommand_SRCS})
target_link_libraries(plasma_applet_runcommand
                      ${QT_QTSCRIPT_LIBRARY}
                      ${KDE4_PLASMA_LIBS}
                      ${KDE4_KCMUTILS_LIBS}
                      ${KDE4_KDEUI_LIBS}
                      ${KDE4_KIO_LIBS}
                      kworkspace
                      )

install(TARGETS plasma_applet_runcommand
        DESTINATION ${PLUGIN_INSTALL_DIR})

install(FILES plasma-applet-runcommand.desktop
        DESTINATION ${SERVICES_INSTALL_DIR})
