~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to plasma/generic/dataengines/nowplaying/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
project(plasma-dataengine-nowplaying)
 
2
 
 
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
 
15
)
 
16
 
 
17
QT4_ADD_DBUS_INTERFACE(nowplaying_engine_SRCS playerinterface/org.kde.juk.player.xml juk_interface)
 
18
 
 
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
 
24
)
 
25
QT4_ADD_DBUS_INTERFACE(nowplaying_engine_SRCS ${mpris_player_desc} mprisplayer)
 
26
 
 
27
if(GLIB2_FOUND)
 
28
   macro_optional_find_package(Xmms)
 
29
   macro_log_feature(XMMS_FOUND "XMMS" "X MultiMedia System development 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)
 
39
 
 
40
configure_file(config-nowplaying.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-nowplaying.h)
 
41
 
 
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)
 
47
 
 
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)
 
51