From 432bf69ad6217abfda330cb648ae45dfc5cb1e66 Mon Sep 17 00:00:00 2001
From: Tofu Linden <tofu.linden@lindenlab.com>
Date: Tue, 8 Dec 2009 08:56:13 +0000
Subject: [PATCH]  	DEV-43897 	 linux viewer2 corrupted vorbis
 problem

we were accidentally linking the duff fmod vorbis first because our dependancies weren't well-defined.
---
 indra/cmake/LLAudio.cmake    | 3 ++-
 indra/newview/CMakeLists.txt | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/indra/cmake/LLAudio.cmake b/indra/cmake/LLAudio.cmake
index 89b790c6b0a..7c248dfc720 100644
--- a/indra/cmake/LLAudio.cmake
+++ b/indra/cmake/LLAudio.cmake
@@ -6,4 +6,5 @@ set(LLAUDIO_INCLUDE_DIRS
     ${LIBS_OPEN_DIR}/llaudio
     )
 
-set(LLAUDIO_LIBRARIES llaudio ${OPENAL_LIBRARIES})
+# be exhaustive here
+set(LLAUDIO_LIBRARIES llaudio ${VORBISFILE_LIBRARIES} ${VORBIS_LIBRARIES} ${VORBISENC_LIBRARIES} ${OGG_LIBRARIES} ${OPENAL_LIBRARIES})
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index f41505a82df..57d67bd560a 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1523,7 +1523,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
     ${BOOST_REGEX_LIBRARY}
     ${DBUSGLIB_LIBRARIES}
     ${OPENGL_LIBRARIES}
-    ${FMODWRAPPER_LIBRARY}
+    ${FMODWRAPPER_LIBRARY} # must come after LLAudio
     ${OPENGL_LIBRARIES}
     ${SDL_LIBRARY}
     ${SMARTHEAP_LIBRARY}
-- 
GitLab