author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 18 Aug 2010 10:37:55 +0300 | |
changeset 33 | 3e2da88830cd |
parent 30 | 5dc02b23752f |
permissions | -rw-r--r-- |
0 | 1 |
# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 |
# Copyright (C) 2008 Matthias Kretz <kretz@kde.org> |
|
3 |
# |
|
4 |
# This library is free software: you can redistribute it and/or modify |
|
5 |
# it under the terms of the GNU Lesser General Public License as published by |
|
6 |
# the Free Software Foundation, either version 2 or 3 of the License. |
|
7 |
# |
|
8 |
# This library is distributed in the hope that it will be useful, |
|
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 |
# GNU Lesser General Public License for more details. |
|
12 |
# |
|
13 |
# You should have received a copy of the GNU Lesser General Public License |
|
14 |
# along with this library. If not, see <http://www.gnu.org/licenses/>. |
|
15 |
||
16 |
project(phonon-gstreamer) |
|
17 |
include(ConfigureChecks.cmake) |
|
18 |
||
19 |
if (BUILD_PHONON_GSTREAMER) |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
20 |
include_directories( |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
21 |
${CMAKE_CURRENT_BINARY_DIR} |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
22 |
${GSTREAMER_INCLUDE_DIR} |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
23 |
${GLIB2_INCLUDE_DIR} |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
24 |
${LIBXML2_INCLUDE_DIR} |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
25 |
${X11_X11_INCLUDE_PATH}) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
26 |
add_definitions(-DPHONON_BACKEND_VERSION_4_2) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
27 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
28 |
# configure plugin api |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
29 |
if(USE_INSTALL_PLUGIN) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
30 |
set(PLUGIN_INSTALL_API TRUE) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
31 |
endif(USE_INSTALL_PLUGIN) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
32 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
33 |
configure_file(phonon-config-gstreamer.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/phonon-config-gstreamer.h ) |
0 | 34 |
|
35 |
set(phonon_gstreamer_SRCS |
|
36 |
audiooutput.cpp |
|
37 |
backend.cpp |
|
38 |
devicemanager.cpp |
|
39 |
effectmanager.cpp |
|
40 |
gsthelper.cpp |
|
41 |
mediaobject.cpp |
|
42 |
medianode.cpp |
|
43 |
effect.cpp |
|
44 |
medianodeevent.cpp |
|
45 |
videowidget.cpp |
|
46 |
qwidgetvideosink.cpp |
|
47 |
streamreader.cpp |
|
48 |
phononsrc.cpp |
|
49 |
message.cpp |
|
50 |
audioeffect.cpp |
|
51 |
abstractrenderer.cpp |
|
52 |
widgetrenderer.cpp |
|
53 |
glrenderer.cpp |
|
54 |
volumefadereffect.cpp |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
55 |
audiodataoutput.cpp |
0 | 56 |
) |
57 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
58 |
if(NOT WIN32) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
59 |
set(phonon_gstreamer_SRCS |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
60 |
${phonon_gstreamer_SRCS} |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
61 |
artssink.cpp |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
62 |
x11renderer.cpp) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
63 |
macro_optional_find_package(Alsa) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
64 |
macro_ensure_version("0.10.22" ${GSTREAMER_VERSION} GSTREAMER_HAS_NONBLOCKING_ALSASINK) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
65 |
endif(NOT WIN32) |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
66 |
if(ALSA_FOUND AND NOT GSTREAMER_HAS_NONBLOCKING_ALSASINK) |
0 | 67 |
add_definitions(-DUSE_ALSASINK2) |
68 |
include_directories(${ALSA_INCLUDES}) |
|
69 |
set(phonon_gstreamer_SRCS |
|
70 |
${phonon_gstreamer_SRCS} |
|
71 |
alsasink2.c |
|
72 |
) |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
73 |
endif(ALSA_FOUND AND NOT GSTREAMER_HAS_NONBLOCKING_ALSASINK) |
0 | 74 |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
75 |
automoc4_add_library(phonon_gstreamer MODULE ${phonon_gstreamer_SRCS}) |
0 | 76 |
set_target_properties(phonon_gstreamer PROPERTIES PREFIX "") |
77 |
target_link_libraries(phonon_gstreamer |
|
78 |
${QT_QTOPENGL_LIBRARY} |
|
79 |
${PHONON_LIBS} ${OPENGL_gl_LIBRARY} |
|
80 |
${GSTREAMER_LIBRARIES} ${GSTREAMER_BASE_LIBRARY} ${GSTREAMER_INTERFACE_LIBRARY} |
|
81 |
${GSTREAMER_PLUGIN_VIDEO_LIBRARIES} ${GSTREAMER_PLUGIN_AUDIO_LIBRARIES} |
|
82 |
${GLIB2_LIBRARIES} ${GOBJECT_LIBRARIES}) |
|
83 |
if(ALSA_FOUND) |
|
84 |
target_link_libraries(phonon_gstreamer ${ASOUND_LIBRARY}) |
|
85 |
endif(ALSA_FOUND) |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
86 |
if(USE_INSTALL_PLUGIN) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
87 |
target_link_libraries(phonon_gstreamer ${GSTREAMER_PLUGIN_PBUTILS_LIBRARIES}) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
88 |
endif(USE_INSTALL_PLUGIN) |
0 | 89 |
|
90 |
install(TARGETS phonon_gstreamer DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/phonon_backend) |
|
91 |
install(FILES gstreamer.desktop DESTINATION ${SERVICES_INSTALL_DIR}/phononbackends) |
|
92 |
endif (BUILD_PHONON_GSTREAMER) |