From ebfcb6f4e8cad8052ba2c924741a0098b572ed81 Mon Sep 17 00:00:00 2001
From: Roxie Linden <roxie@lindenlab.com>
Date: Mon, 11 Sep 2023 15:38:58 -0700
Subject: some build tweaks

---
 indra/cmake/WebRTC.cmake                        | 4 ++--
 indra/llwebrtc/CMakeLists.txt                   | 8 +++-----
 indra/newview/viewer_manifest.py                | 6 ++++++
 indra/secondlife-binRelWithDebInfo.entitlements | 8 ++++++++
 4 files changed, 19 insertions(+), 7 deletions(-)
 create mode 100644 indra/secondlife-binRelWithDebInfo.entitlements

(limited to 'indra')

diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake
index 4b2dcebbe6..20417ebb41 100644
--- a/indra/cmake/WebRTC.cmake
+++ b/indra/cmake/WebRTC.cmake
@@ -25,11 +25,11 @@ if (WINDOWS)
 elseif (DARWIN)
     FetchContent_Declare(
       webrtc
+      URL "https://webrtc-build-releases.s3.us-west-2.amazonaws.com/webrtc.macos_x86_64.tar.bz2"
+      URL_HASH "MD5=cfbcac7da897a862f9791ea29330b814"
       FIND_PACKAGE_ARGS NAMES webrtc
       DOWNLOAD_EXTRACT_TIMESTAMP TRUE
       DOWNLOAD_DIR "${LIBS_PREBUILT_DIR}/webrtc/"
-      URL "https://webrtc-build-releases.s3.us-west-2.amazonaws.com/webrtc.macos_x86_64.tar.bz2"
-      URL_HASH "MD5=cfbcac7da897a862f9791ea29330b814"
     )
 endif (WINDOWS)
 
diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt
index a06e0aaa03..f32d3dc580 100644
--- a/indra/llwebrtc/CMakeLists.txt
+++ b/indra/llwebrtc/CMakeLists.txt
@@ -5,7 +5,9 @@ set(CMAKE_CXX_STANDARD 20)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
 
-set(CMAKE_GENERATOR_TOOLSET "CLangCL")
+if (WINDOWS)
+    set(CMAKE_GENERATOR_TOOLSET "CLangCL")
+endif (WINDOWS)
 
 include(00-Common)
 include(Linking)
@@ -52,10 +54,6 @@ target_include_directories( llwebrtc  INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
 if (WINDOWS)
     set_property(TARGET llwebrtc PROPERTY
         MSVC_RUNTIME_LIBRARY "MultiThreadedDebug")
-    ADD_CUSTOM_COMMAND(TARGET llwebrtc POST_BUILD
-                   COMMAND ${CMAKE_COMMAND} -E copy_if_different
-                       $<TARGET_FILE:llwebrtc>
-                               ${SHARED_LIB_STAGING_DIR})
 endif (WINDOWS)
 
 ADD_CUSTOM_COMMAND(TARGET llwebrtc POST_BUILD
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 9230cb0589..b7b737ee4b 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -1004,6 +1004,12 @@ class Darwin_x86_64_Manifest(ViewerManifest):
                     ):
                         self.path(libfile)
 
+                        oldpath = os.path.join("@rpath", libfile)
+                        self.run_command(
+                            ['install_name_tool', '-change', oldpath,
+                             '@executable_path/../Resources/%s' % libfile,
+                             executable])
+
                 # dylibs is a list of all the .dylib files we expect to need
                 # in our bundled sub-apps. For each of these we'll create a
                 # symlink from sub-app/Contents/Resources to the real .dylib.
diff --git a/indra/secondlife-binRelWithDebInfo.entitlements b/indra/secondlife-binRelWithDebInfo.entitlements
new file mode 100644
index 0000000000..b572d9c04e
--- /dev/null
+++ b/indra/secondlife-binRelWithDebInfo.entitlements
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>com.apple.security.device.audio-input</key>
+	<true/>
+</dict>
+</plist>
-- 
cgit v1.2.3