diff options
author | Aleric Inglewood | 2010-10-02 21:12:22 +0200 |
---|---|---|
committer | Aleric Inglewood | 2010-10-02 21:12:22 +0200 |
commit | e14cd4c42432fa5825f06248c8cf45cf944505f3 (patch) | |
tree | d21f4742f6d7b10543918265854c4b990056ab8a /linden/indra | |
parent | RED-560: Revert changes to indra/cmake/OPENAL.cmake (diff) | |
download | meta-impy-e14cd4c42432fa5825f06248c8cf45cf944505f3.zip meta-impy-e14cd4c42432fa5825f06248c8cf45cf944505f3.tar.gz meta-impy-e14cd4c42432fa5825f06248c8cf45cf944505f3.tar.bz2 meta-impy-e14cd4c42432fa5825f06248c8cf45cf944505f3.tar.xz |
RED-560: Add support for STANDALONE to OPENAL.cmake
Use pkg_check_modules to find freealut (and openal) for STANDALONE.
Non-standalone is untouched by this version.
The changes relative to snowglobe (for the STANDALONE path) is
that I removed the 'include(FindOpenAL) (that comes with cmake)
which not only doesn't find libalut, but even sets the wrong
cmake variables (it sets OPENAL_LIBRARY, and our cmake scripts
*use* OPENAL_LIBRARIES). Moreover, under the assumption that
STANDALONE really is only for linux (and I think that is so),
every linux distribution DOES have freealut (and openal) installed
with a pkg-config anyway. I also removed pkg_check_modules(openal)
because it is redundant: freealut pulls that in already.
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/cmake/OPENAL.cmake | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake index 4f0e0cc..b9efd57 100644 --- a/linden/indra/cmake/OPENAL.cmake +++ b/linden/indra/cmake/OPENAL.cmake | |||
@@ -2,11 +2,21 @@ | |||
2 | 2 | ||
3 | include(Variables) | 3 | include(Variables) |
4 | include(Linking) | 4 | include(Linking) |
5 | include(FindPkgConfig) | ||
5 | 6 | ||
6 | set(OPENAL ON CACHE BOOL "Enable OpenAL") | 7 | set(OPENAL ON CACHE BOOL "Enable OpenAL") |
7 | 8 | ||
9 | # If STANDALONE but NOT PKG_CONFIG_FOUND we should fail, | ||
10 | # but why try to find it as prebuilt? | ||
11 | if (OPENAL AND STANDALONE AND PKG_CONFIG_FOUND) | ||
8 | 12 | ||
9 | if (OPENAL) | 13 | # This module defines |
14 | # OPENAL_INCLUDE_DIRS | ||
15 | # OPENAL_LIBRARIES | ||
16 | # OPENAL_FOUND | ||
17 | pkg_check_modules(OPENAL REQUIRED freealut) # freealut links with openal. | ||
18 | |||
19 | elseif (OPENAL) | ||
10 | 20 | ||
11 | # message(STATUS "Building with OpenAL audio support") | 21 | # message(STATUS "Building with OpenAL audio support") |
12 | 22 | ||
@@ -110,4 +120,4 @@ if (OPENAL) | |||
110 | "Found OpenAL and ALUT libraries successfully" | 120 | "Found OpenAL and ALUT libraries successfully" |
111 | ) | 121 | ) |
112 | 122 | ||
113 | endif (OPENAL) | 123 | endif (OPENAL AND STANDALONE AND PKG_CONFIG_FOUND) |