summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/PulseAudio.cmake28
-rw-r--r--indra/media_plugins/webkit/CMakeLists.txt3
2 files changed, 31 insertions, 0 deletions
diff --git a/indra/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake
new file mode 100644
index 0000000000..f8087a8083
--- /dev/null
+++ b/indra/cmake/PulseAudio.cmake
@@ -0,0 +1,28 @@
+# -*- cmake -*-
+include(Prebuilt)
+
+if (STANDALONE)
+ include(FindPkgConfig)
+
+ pkg_check_modules(PULSEAUDIO REQUIRED libpulse-mainloop-glib)
+
+elseif (LINUX)
+ use_prebuilt_binary(pulseaudio)
+ set(PULSEAUDIO_FOUND ON FORCE BOOL)
+ set(PULSEAUDIO_INCLUDE_DIRS
+ ${LIBS_PREBUILT_DIR}/include
+ )
+ # We don't need to explicitly link against pulseaudio itself, because
+ # the viewer probes for the system's copy at runtime.
+ set(PULSEAUDIO_LIBRARIES
+ # none needed!
+ )
+endif (STANDALONE)
+
+if (PULSEAUDIO_FOUND)
+ set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.")
+endif (PULSEAUDIO_FOUND)
+
+if (PULSEAUDIO)
+ add_definitions(-DLL_PULSEAUDIO_ENABLED=1)
+endif (PULSEAUDIO)
diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt
index 3ab5522386..9f66a77c64 100644
--- a/indra/media_plugins/webkit/CMakeLists.txt
+++ b/indra/media_plugins/webkit/CMakeLists.txt
@@ -14,10 +14,12 @@ include(Linking)
include(PluginAPI)
include(MediaPluginBase)
include(FindOpenGL)
+include(PulseAudio)
include(WebKitLibPlugin)
include_directories(
+ ${PULSEAUDIO_INCLUDE_DIRS}
${LLPLUGIN_INCLUDE_DIRS}
${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
${LLCOMMON_INCLUDE_DIRS}
@@ -40,6 +42,7 @@ set(media_plugin_webkit_LINK_LIBRARIES
${LLCOMMON_LIBRARIES}
${WEBKIT_PLUGIN_LIBRARIES}
${PLUGIN_API_WINDOWS_LIBRARIES}
+ ${PULSEAUDIO_LIBRARIES}
)
if (LINUX)