From e9ad14eb25fd2a5eee12935b53647e50e6fffe6e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 14 Feb 2020 23:43:29 +0100 Subject: [PATCH] Yoink back OpenAL changes from LL and sync with upstream --- indra/lib/python/indra/util/llmanifest.py | 4 +--- indra/llaudio/CMakeLists.txt | 4 ++++ indra/newview/CMakeLists.txt | 26 +++++++++++------------ indra/newview/viewer_manifest.py | 3 ++- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index ffde022166..f8771b5936 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -161,9 +161,7 @@ BASE_ARGUMENTS=[ dict(name='viewer_flavor', description='Type of viewer build. Can be oss or hvk.', default="oss"), dict(name='fmodversion', - description='Version of FMOD used. Can be fmodstudio or fmodex.', default=None), - dict(name='openal', - description='If OpenAL is used.', default=None) + description='Version of FMOD used. Can be fmodstudio or fmodex.', default=None) ] def usage(arguments, srctree=""): diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 0df1be69b9..9da9e8f27c 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -78,6 +78,10 @@ if (FMODEX) endif (FMODEX) if (OPENAL) + include_directories( + ${OPENAL_LIBRARIES} + ) + list(APPEND llaudio_SOURCE_FILES llaudioengine_openal.cpp lllistener_openal.cpp diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e5bf44fbf5..735da21d05 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1974,6 +1974,10 @@ if (WINDOWS) LIST(APPEND viewer_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../tools/manifests/legacy.manifest) endif (ADDRESS_SIZE EQUAL 64) # + + if (OPENAL) + LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES}) + endif (OPENAL) endif (WINDOWS) # Add the xui files. This is handy for searching for xui elements @@ -2163,10 +2167,6 @@ elseif (FMODEX) set(FMODVERSION "fmodex") endif (FMODSTUDIO) -if (OPENAL) - set(USE_OPENAL "true") -endif (OPENAL) - if (WINDOWS) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES @@ -2275,10 +2275,8 @@ if (WINDOWS) if (OPENAL) list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/Release/OpenAL32.dll - ${SHARED_LIB_STAGING_DIR}/Release/alut.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/OpenAL32.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/alut.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/alut.dll ) endif (OPENAL) @@ -2302,7 +2300,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py stage_third_party_libs @@ -2366,7 +2364,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2539,7 +2537,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2565,7 +2563,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2650,7 +2648,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2687,7 +2685,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index b9f718863a..5e35b01063 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -590,7 +590,7 @@ class WindowsManifest(ViewerManifest): self.path("fmodex.dll") # Get openal dll - if self.args.get('openal').lower() == 'true': + if self.args.get('openal') == 'ON': self.path("OpenAL32.dll") self.path("alut.dll") @@ -2257,6 +2257,7 @@ if __name__ == "__main__": extra_arguments = [ dict(name='bugsplat', description="""BugSplat database to which to post crashes, if BugSplat crash reporting is desired""", default=''), + dict(name='openal', description="""Indication openal libraries are needed""", default='OFF') ] try: main(extra=extra_arguments)