summaryrefslogtreecommitdiff
path: root/indra/cmake/OPENAL.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/OPENAL.cmake')
-rw-r--r--indra/cmake/OPENAL.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake
new file mode 100644
index 0000000000..eb195a06a0
--- /dev/null
+++ b/indra/cmake/OPENAL.cmake
@@ -0,0 +1,28 @@
+# -*- cmake -*-
+include(Linking)
+include(Prebuilt)
+
+if (LINUX)
+ set(OPENAL ON CACHE BOOL "Enable OpenAL")
+else (LINUX)
+ set(OPENAL OFF CACHE BOOL "Enable OpenAL")
+endif (LINUX)
+
+if (OPENAL)
+ if (STANDALONE)
+ include(FindPkgConfig)
+ include(FindOpenAL)
+ pkg_check_modules(OPENAL_LIB REQUIRED openal)
+ pkg_check_modules(FREEALUT_LIB REQUIRED freealut)
+ else (STANDALONE)
+ use_prebuilt_binary(openal)
+ endif (STANDALONE)
+ set(OPENAL_LIBRARIES
+ openal
+ alut
+ )
+endif (OPENAL)
+
+if (OPENAL)
+ message(STATUS "Building with OpenAL audio support")
+endif (OPENAL)