summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-22 16:50:26 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-22 16:50:26 +0000
commitf43a9a181ee0233adaed03a93190dc518ff0047f (patch)
treea0fcb46145b8f0e9e4233cbc4ab3510c6fd5f371 /indra/cmake
parent2a9232d307987b045dbeca898108aafc836ae0d6 (diff)
Do the necessary stuff to package pulseaudio's headers and make it (in theory, not yet in practice) optional.
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/PulseAudio.cmake28
1 files changed, 28 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)