aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake
diff options
context:
space:
mode:
authorunknown2008-12-30 13:44:15 -0700
committerunknown2008-12-30 13:44:15 -0700
commit48cd01106bb9567353fbe18c44f3c90a78ab8731 (patch)
tree5cc5089770a91d0f888098963748a1bebbb127c8 /linden/indra/cmake
parentAdded fix for VWR-10392 as well as other fixes (diff)
parentWorkaround for change volume bug in gstreamen 0.10.21 (diff)
downloadmeta-impy-48cd01106bb9567353fbe18c44f3c90a78ab8731.zip
meta-impy-48cd01106bb9567353fbe18c44f3c90a78ab8731.tar.gz
meta-impy-48cd01106bb9567353fbe18c44f3c90a78ab8731.tar.bz2
meta-impy-48cd01106bb9567353fbe18c44f3c90a78ab8731.tar.xz
Merged in balp's openal branch
Diffstat (limited to 'linden/indra/cmake')
-rw-r--r--linden/indra/cmake/LLAudio.cmake3
-rw-r--r--linden/indra/cmake/OPENAL.cmake85
2 files changed, 88 insertions, 0 deletions
diff --git a/linden/indra/cmake/LLAudio.cmake b/linden/indra/cmake/LLAudio.cmake
index 7b9f254..dcfd269 100644
--- a/linden/indra/cmake/LLAudio.cmake
+++ b/linden/indra/cmake/LLAudio.cmake
@@ -1,9 +1,11 @@
1# -*- cmake -*- 1# -*- cmake -*-
2 2
3include(Audio) 3include(Audio)
4include(OPENAL)
4 5
5set(LLAUDIO_INCLUDE_DIRS 6set(LLAUDIO_INCLUDE_DIRS
6 ${LIBS_OPEN_DIR}/llaudio 7 ${LIBS_OPEN_DIR}/llaudio
8 ${OPENAL_INCLUDE_DIRS}
7 ) 9 )
8 10
9set(LLAUDIO_LIBRARIES 11set(LLAUDIO_LIBRARIES
@@ -12,4 +14,5 @@ set(LLAUDIO_LIBRARIES
12 ${VORBISFILE_LIBRARIES} 14 ${VORBISFILE_LIBRARIES}
13 ${VORBIS_LIBRARIES} 15 ${VORBIS_LIBRARIES}
14 ${OGG_LIBRARIES} 16 ${OGG_LIBRARIES}
17 ${OPENAL_LIBRARIES}
15 ) 18 )
diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake
new file mode 100644
index 0000000..a2bae5d
--- /dev/null
+++ b/linden/indra/cmake/OPENAL.cmake
@@ -0,0 +1,85 @@
1# -*- cmake -*-
2
3set(OPENAL ON CACHE BOOL "Enable OpenAL")
4
5
6if (OPENAL)
7
8 # message(STATUS "Building with OpenAL audio support")
9
10 # OPENAL_LIB
11
12 find_library(OPENAL_LIB
13 NAMES openal OpenAL OpenAL32 wrap_oal
14 PATHS ${ARCH_PREBUILT_DIRS_RELEASE}
15 )
16
17 if (NOT OPENAL_LIB)
18 message(FATAL_ERROR "OpenAL not found!")
19 else (NOT OPENAL_LIB)
20 # message(STATUS "OpenAL found: ${OPENAL_LIB}")
21 endif (NOT OPENAL_LIB)
22
23
24
25 # OPENAL_INCLUDE_DIR
26
27 find_path(OPENAL_INCLUDE_DIR
28 NAMES al.h
29 PATHS ${LIBS_PREBUILT_DIR}/include /usr/include/AL
30 )
31
32 if (NOT OPENAL_INCLUDE_DIR)
33 message(FATAL_ERROR "al.h not found!")
34 else (NOT OPENAL_INCLUDE_DIR)
35 # message(STATUS "al.h found in: ${OPENAL_INCLUDE_DIR}")
36 endif (NOT OPENAL_INCLUDE_DIR)
37
38
39
40 # ALUT_LIB
41
42 find_library(ALUT_LIB
43 NAMES alut freealut
44 PATHS ${ARCH_PREBUILT_DIRS_RELEASE}
45 )
46
47 if (NOT ALUT_LIB)
48 message(FATAL_ERROR "ALUT not found!")
49 else (NOT ALUT_LIB)
50 # message(STATUS "ALUT found: ${ALUT_LIB}")
51 endif (NOT ALUT_LIB)
52
53
54
55 # ALUT_INCLUDE_DIR
56
57 find_path(ALUT_INCLUDE_DIR
58 NAMES alut.h
59 PATHS ${LIBS_PREBUILT_DIR}/include /usr/include/AL
60 )
61
62 if (NOT ALUT_INCLUDE_DIR)
63 message(FATAL_ERROR "alut.h not found!")
64 else (NOT ALUT_INCLUDE_DIR)
65 # message(STATUS "alut.h found in: ${ALUT_INCLUDE_DIR}")
66 endif (NOT ALUT_INCLUDE_DIR)
67
68
69
70 set(OPENAL_LIBRARIES
71 ${OPENAL_LIB}
72 ${ALUT_LIB}
73 )
74
75 set(OPENAL_INCLUDE_DIRS
76 ${OPENAL_INCLUDE_DIR}
77 ${ALUT_INCLUDE_DIR}
78 )
79
80
81 set(OPENAL_FOUND TRUE CACHE BOOL
82 "Found OpenAL and ALUT libraries successfully"
83 )
84
85endif (OPENAL)