aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake
diff options
context:
space:
mode:
authorJacek Antonelli2008-11-21 21:25:58 -0600
committerJacek Antonelli2008-11-21 22:15:10 -0600
commitb4e5b8567b18a9289b912c720255a7f5d3bcdbf1 (patch)
tree89f187ab3faad6c5cc746a5285e5127535af611b /linden/indra/cmake
parent(Oops, bad indentation in viewer_manifest.py) (diff)
downloadmeta-impy-b4e5b8567b18a9289b912c720255a7f5d3bcdbf1.zip
meta-impy-b4e5b8567b18a9289b912c720255a7f5d3bcdbf1.tar.gz
meta-impy-b4e5b8567b18a9289b912c720255a7f5d3bcdbf1.tar.bz2
meta-impy-b4e5b8567b18a9289b912c720255a7f5d3bcdbf1.tar.xz
Cross-platform checking for OpenAL libs.
Diffstat (limited to 'linden/indra/cmake')
-rw-r--r--linden/indra/cmake/LLAudio.cmake1
-rw-r--r--linden/indra/cmake/OPENAL.cmake83
2 files changed, 78 insertions, 6 deletions
diff --git a/linden/indra/cmake/LLAudio.cmake b/linden/indra/cmake/LLAudio.cmake
index 893aa68..dcfd269 100644
--- a/linden/indra/cmake/LLAudio.cmake
+++ b/linden/indra/cmake/LLAudio.cmake
@@ -5,6 +5,7 @@ include(OPENAL)
5 5
6set(LLAUDIO_INCLUDE_DIRS 6set(LLAUDIO_INCLUDE_DIRS
7 ${LIBS_OPEN_DIR}/llaudio 7 ${LIBS_OPEN_DIR}/llaudio
8 ${OPENAL_INCLUDE_DIRS}
8 ) 9 )
9 10
10set(LLAUDIO_LIBRARIES 11set(LLAUDIO_LIBRARIES
diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake
index 1849fbf..277e3f9 100644
--- a/linden/indra/cmake/OPENAL.cmake
+++ b/linden/indra/cmake/OPENAL.cmake
@@ -2,13 +2,84 @@
2 2
3set(OPENAL ON CACHE BOOL "Enable OpenAL") 3set(OPENAL ON CACHE BOOL "Enable OpenAL")
4 4
5
5if (OPENAL) 6if (OPENAL)
6 include(FindPkgConfig) 7
7 pkg_check_modules(OPENAL_LIB REQUIRED openal) 8 # message(STATUS "Building with OpenAL audio support")
8 pkg_check_modules(FREEAULT_LIB REQUIRED freealut) 9
9 set(OPENAL_LIBRARIES 10 # OPENAL_LIB
10 openal 11
11 alut 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
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
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}
12 ) 78 )
13 79
80
81 set(OPENAL_FOUND TRUE CACHE BOOL
82 "Found OpenAL and ALUT libraries successfully"
83 )
84
14endif (OPENAL) 85endif (OPENAL)