add more spacing
[personal-kdebase.git] / workspace / plasma / dataengines / nowplaying / CMakeLists.txt
blobf306baffa17a958f9e1ffc7b60fd0641ecd0cbe0
1 project(plasma-dataengine-nowplaying)
3 set(nowplaying_engine_SRCS
4     nowplayingengine.cpp
5     playercontrol.cpp
6     playeractionjob.cpp
7     playercontainer.cpp
8     playerinterface/player.cpp
9     playerinterface/playerfactory.cpp
10     playerinterface/dbuswatcher.cpp
11     playerinterface/pollingwatcher.cpp
12     playerinterface/juk.cpp
13     playerinterface/mpris/mpris.cpp
14     playerinterface/mpris/mprisdbustypes.cpp
17 QT4_ADD_DBUS_INTERFACE(nowplaying_engine_SRCS playerinterface/org.kde.juk.player.xml juk_interface)
19 set(mpris_player_desc playerinterface/mpris/org.freedesktop.MediaPlayer.player.xml)
20 set_source_files_properties(${mpris_player_desc} PROPERTIES
21    NO_NAMESPACE true
22    INCLUDE "playerinterface/mpris/mprisdbustypes.h"
23    CLASSNAME MprisPlayer
25 QT4_ADD_DBUS_INTERFACE(nowplaying_engine_SRCS ${mpris_player_desc} mprisplayer)
27 if(GLIB2_FOUND)
28    macro_optional_find_package(Xmms)
29    macro_log_feature(XMMS_FOUND "XMMS" "X MultiMedia System developement libraries" "http://www.xmms.org" FALSE "" "Support for XMMS in the Now Playing data engine")
30    if(XMMS_FOUND)
31       include_directories(${XMMS_INCLUDE_DIRS})
32       include_directories(${GLIB2_INCLUDE_DIR})
33       set(nowplaying_engine_SRCS ${nowplaying_engine_SRCS} playerinterface/xmms.cpp)
34       message(STATUS "Found XMMS: the nowplaying dataengine will support XMMS 1.x")
35    else(XMMS_FOUND)
36       message(STATUS "Could NOT find XMMS: the nowplaying dataengine will NOT support XMMS 1.x")
37    endif(XMMS_FOUND)
38 endif(GLIB2_FOUND)
40 configure_file(config-nowplaying.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-nowplaying.h)
42 kde4_add_plugin(plasma_engine_nowplaying ${nowplaying_engine_SRCS})
43 target_link_libraries(plasma_engine_nowplaying ${KDE4_KIO_LIBS} ${KDE4_PLASMA_LIBS} ${QT_QTGUI_LIBRARY})
44 if(XMMS_FOUND)
45    target_link_libraries(plasma_engine_nowplaying ${XMMS_LDFLAGS})
46 endif(XMMS_FOUND)
48 install(TARGETS plasma_engine_nowplaying DESTINATION ${PLUGIN_INSTALL_DIR})
49 install(FILES plasma-dataengine-nowplaying.desktop DESTINATION ${SERVICES_INSTALL_DIR})
50 install(FILES nowplaying.operations DESTINATION ${DATA_INSTALL_DIR}/plasma/services)