From 1e1ca05e500079dff4c7b9b81fb649f21ddaebad Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 2 Oct 2010 21:12:22 +0200 Subject: 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. --- linden/indra/cmake/OPENAL.cmake | 14 ++++++++++++-- 1 file 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 @@ include(Variables) include(Linking) +include(FindPkgConfig) set(OPENAL ON CACHE BOOL "Enable OpenAL") +# If STANDALONE but NOT PKG_CONFIG_FOUND we should fail, +# but why try to find it as prebuilt? +if (OPENAL AND STANDALONE AND PKG_CONFIG_FOUND) -if (OPENAL) + # This module defines + # OPENAL_INCLUDE_DIRS + # OPENAL_LIBRARIES + # OPENAL_FOUND + pkg_check_modules(OPENAL REQUIRED freealut) # freealut links with openal. + +elseif (OPENAL) # message(STATUS "Building with OpenAL audio support") @@ -110,4 +120,4 @@ if (OPENAL) "Found OpenAL and ALUT libraries successfully" ) -endif (OPENAL) +endif (OPENAL AND STANDALONE AND PKG_CONFIG_FOUND) -- cgit v1.1