From 24d8ec3dbb2aad652d1753888606d26ba8192a36 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Mon, 10 Dec 2018 14:04:12 +0100 Subject: [PATCH] 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 Commit-Queue: Anders Carlsson Cr-Commit-Position: refs/heads/master@{#25949} --- examples/BUILD.gn | 5 +++++ sdk/BUILD.gn | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/BUILD.gn b/examples/BUILD.gn index 4789238dec..be3ac53899 100644 --- a/examples/BUILD.gn +++ b/examples/BUILD.gn @@ -579,6 +579,11 @@ if (is_ios || (is_mac && target_cpu != "x86")) { 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 60ea4734e9..2498bb700a 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -1494,7 +1494,7 @@ if (is_ios || is_mac) { "$root_build_dir/WebRTC.framework", ] outputs = [ - "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}", + "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}", ] } }