Set @rpath in AppRTCMobile for macOS.
Without this, the application can't find the WebRTC dynamic library
when started from the built app bundle (debugging in Xcode worked).
Bug: webrtc:10111
Change-Id: I1610948aae070fe9938e873ce073e05ba7255c7d
Reviewed-on: https://webrtc-review.googlesource.com/c/113805
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25949}
diff --git a/examples/BUILD.gn b/examples/BUILD.gn
index 4789238..be3ac53 100644
--- a/examples/BUILD.gn
+++ b/examples/BUILD.gn
@@ -579,6 +579,11 @@
libs = [ "AppKit.framework" ]
+ ldflags = [
+ "-rpath",
+ "@executable_path/../Frameworks",
+ ]
+
deps = [
":AppRTCMobile_lib",
"../sdk:mac_framework_bundle",
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 60ea473..2498bb7 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -1494,7 +1494,7 @@
"$root_build_dir/WebRTC.framework",
]
outputs = [
- "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
+ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}",
]
}
}