Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2440)

Unified Diff: webrtc/sdk/BUILD.gn

Issue 2673573003: Modify build scripts for ios .framework to compile metal shaders. (Closed)
Patch Set: Address comments from patchset 2 Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/sdk/objc/Framework/Headers/WebRTC/WebRTC.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/BUILD.gn
diff --git a/webrtc/sdk/BUILD.gn b/webrtc/sdk/BUILD.gn
index 3e44f9b4a33c4a3d569369e970f9a16056e8e707..15bcb9e9ccd32205eab216041e790bf4514311f6 100644
--- a/webrtc/sdk/BUILD.gn
+++ b/webrtc/sdk/BUILD.gn
@@ -7,6 +7,7 @@
# be found in the AUTHORS file in the root of the source tree.
import("../webrtc.gni")
+import("./objc/metal.gni")
if (is_ios) {
import("//build/config/ios/rules.gni")
}
@@ -67,7 +68,11 @@ if (is_ios || is_mac) {
"objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
"objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
]
- libs = [ "AVFoundation.framework" ]
+ libs = [
+ "AVFoundation.framework",
+ "Metal.framework",
+ "MetalKit.framework",
+ ]
}
if (!build_with_chromium) {
sources += [
@@ -265,6 +270,21 @@ if (is_ios || is_mac) {
}
if (is_ios) {
+ compile_metal_lib("metal_lib") {
+ source = "objc/Framework/Classes/metal/Shaders.metal"
+ }
+
+ bundle_data("metal_bundle") {
+ public_deps = [
+ ":metal_lib",
+ ]
+ metal_sources = get_target_outputs(":metal_lib")
+ sources = metal_sources
+ outputs = [
+ "{{bundle_root_dir}}//rtc_shaders.metallib",
+ ]
+ }
+
ios_framework_bundle("rtc_sdk_framework_objc") {
info_plist = "objc/Framework/Info.plist"
output_name = "WebRTC"
@@ -307,6 +327,8 @@ if (is_ios || is_mac) {
"objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
"objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
"objc/Framework/Headers/WebRTC/WebRTC.h",
+ "objc/Framework/Headers/WebRTC/RTCMTLRenderer.h",
+ "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
]
sources = common_objc_headers
@@ -324,6 +346,7 @@ if (is_ios || is_mac) {
]
deps = [
+ ":metal_bundle",
":rtc_sdk_peerconnection_objc",
"../system_wrappers:field_trial_default",
"../system_wrappers:metrics_default",
@@ -336,6 +359,8 @@ if (is_ios || is_mac) {
"CoreMedia.framework",
"GLKit.framework",
"VideoToolbox.framework",
+ "Metal.framework",
+ "MetalKit.framework",
]
configs += [
« no previous file with comments | « no previous file | webrtc/sdk/objc/Framework/Headers/WebRTC/WebRTC.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698