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

Unified Diff: webrtc/sdk/BUILD.gn

Issue 2673573003: Modify build scripts for ios .framework to compile metal shaders. (Closed)
Patch Set: Bundle metal for ios only Created 3 years, 11 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
Index: webrtc/sdk/BUILD.gn
diff --git a/webrtc/sdk/BUILD.gn b/webrtc/sdk/BUILD.gn
index 3e44f9b4a33c4a3d569369e970f9a16056e8e707..bea2731e4f470920f7dc7e6872a3f42ead21f5ba 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")
}
@@ -47,6 +48,8 @@ if (is_ios || is_mac) {
"objc/Framework/Classes/RTCMetricsSampleInfo.mm",
"objc/Framework/Classes/RTCSSLAdapter.mm",
"objc/Framework/Classes/RTCTracing.mm",
+ "objc/Framework/Classes/metal/RTCMTLRenderer.mm",
+ "objc/Framework/Classes/metal/RTCMTLVideoView.m",
kthelgason 2017/02/02 15:22:36 Is it ok to include these on macOS as well? In fac
daniela-webrtc 2017/02/02 15:36:54 Great catch! They are not inteded to be included i
daniela-webrtc 2017/02/07 10:43:59 Done.
"objc/Framework/Headers/WebRTC/RTCDispatcher.h",
"objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
"objc/Framework/Headers/WebRTC/RTCLogging.h",
@@ -67,7 +70,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 +272,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 +329,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 +348,7 @@ if (is_ios || is_mac) {
]
deps = [
+ ":metal_bundle",
":rtc_sdk_peerconnection_objc",
"../system_wrappers:field_trial_default",
"../system_wrappers:metrics_default",
@@ -336,6 +361,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') | webrtc/sdk/objc/compile_metal_lib.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698