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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/sdk/objc/Framework/Headers/WebRTC/WebRTC.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The WebRTC project authors. All Rights Reserved. 1 # Copyright 2016 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source 4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 import("../webrtc.gni") 9 import("../webrtc.gni")
10 import("./objc/metal.gni")
10 if (is_ios) { 11 if (is_ios) {
11 import("//build/config/ios/rules.gni") 12 import("//build/config/ios/rules.gni")
12 } 13 }
13 14
14 group("sdk") { 15 group("sdk") {
15 if (is_ios) { 16 if (is_ios) {
16 public_deps = [ 17 public_deps = [
17 ":rtc_sdk_framework_objc", 18 ":rtc_sdk_framework_objc",
18 ] 19 ]
19 } 20 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 sources += [ 61 sources += [
61 "objc/Framework/Classes/RTCCameraPreviewView.m", 62 "objc/Framework/Classes/RTCCameraPreviewView.m",
62 "objc/Framework/Classes/RTCUIApplication.h", 63 "objc/Framework/Classes/RTCUIApplication.h",
63 "objc/Framework/Classes/RTCUIApplication.mm", 64 "objc/Framework/Classes/RTCUIApplication.mm",
64 "objc/Framework/Classes/UIDevice+RTCDevice.mm", 65 "objc/Framework/Classes/UIDevice+RTCDevice.mm",
65 "objc/Framework/Classes/helpers.h", 66 "objc/Framework/Classes/helpers.h",
66 "objc/Framework/Classes/helpers.mm", 67 "objc/Framework/Classes/helpers.mm",
67 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h", 68 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
68 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", 69 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
69 ] 70 ]
70 libs = [ "AVFoundation.framework" ] 71 libs = [
72 "AVFoundation.framework",
73 "Metal.framework",
74 "MetalKit.framework",
75 ]
71 } 76 }
72 if (!build_with_chromium) { 77 if (!build_with_chromium) {
73 sources += [ 78 sources += [
74 "objc/Framework/Classes/RTCFileLogger.mm", 79 "objc/Framework/Classes/RTCFileLogger.mm",
75 "objc/Framework/Headers/WebRTC/RTCFileLogger.h", 80 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
76 ] 81 ]
77 } 82 }
78 } 83 }
79 84
80 rtc_static_library("rtc_sdk_peerconnection_objc") { 85 rtc_static_library("rtc_sdk_peerconnection_objc") {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 263
259 defines = [ "GTEST_RELATIVE_PATH" ] 264 defines = [ "GTEST_RELATIVE_PATH" ]
260 if (!build_with_chromium && is_clang) { 265 if (!build_with_chromium && is_clang) {
261 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) . 266 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) .
262 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 267 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
263 } 268 }
264 } 269 }
265 } 270 }
266 271
267 if (is_ios) { 272 if (is_ios) {
273 compile_metal_lib("metal_lib") {
274 source = "objc/Framework/Classes/metal/Shaders.metal"
275 }
276
277 bundle_data("metal_bundle") {
278 public_deps = [
279 ":metal_lib",
280 ]
281 metal_sources = get_target_outputs(":metal_lib")
282 sources = metal_sources
283 outputs = [
284 "{{bundle_root_dir}}//rtc_shaders.metallib",
285 ]
286 }
287
268 ios_framework_bundle("rtc_sdk_framework_objc") { 288 ios_framework_bundle("rtc_sdk_framework_objc") {
269 info_plist = "objc/Framework/Info.plist" 289 info_plist = "objc/Framework/Info.plist"
270 output_name = "WebRTC" 290 output_name = "WebRTC"
271 291
272 common_objc_headers = [ 292 common_objc_headers = [
273 "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h", 293 "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h",
274 "objc/Framework/Headers/WebRTC/RTCAudioSource.h", 294 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
275 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h", 295 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
276 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h", 296 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
277 "objc/Framework/Headers/WebRTC/RTCConfiguration.h", 297 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
(...skipping 22 matching lines...) Expand all
300 "objc/Framework/Headers/WebRTC/RTCRtpSender.h", 320 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
301 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", 321 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
302 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h", 322 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
303 "objc/Framework/Headers/WebRTC/RTCTracing.h", 323 "objc/Framework/Headers/WebRTC/RTCTracing.h",
304 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h", 324 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
305 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h", 325 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
306 "objc/Framework/Headers/WebRTC/RTCVideoSource.h", 326 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
307 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h", 327 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
308 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", 328 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
309 "objc/Framework/Headers/WebRTC/WebRTC.h", 329 "objc/Framework/Headers/WebRTC/WebRTC.h",
330 "objc/Framework/Headers/WebRTC/RTCMTLRenderer.h",
331 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
310 ] 332 ]
311 333
312 sources = common_objc_headers 334 sources = common_objc_headers
313 public_headers = common_objc_headers 335 public_headers = common_objc_headers
314 336
315 if (!build_with_chromium) { 337 if (!build_with_chromium) {
316 sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] 338 sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ]
317 public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] 339 public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ]
318 } 340 }
319 341
320 ldflags = [ 342 ldflags = [
321 "-all_load", 343 "-all_load",
322 "-install_name", 344 "-install_name",
323 "@rpath/$output_name.framework/$output_name", 345 "@rpath/$output_name.framework/$output_name",
324 ] 346 ]
325 347
326 deps = [ 348 deps = [
349 ":metal_bundle",
327 ":rtc_sdk_peerconnection_objc", 350 ":rtc_sdk_peerconnection_objc",
328 "../system_wrappers:field_trial_default", 351 "../system_wrappers:field_trial_default",
329 "../system_wrappers:metrics_default", 352 "../system_wrappers:metrics_default",
330 ] 353 ]
331 354
332 libs = [ 355 libs = [
333 "AVFoundation.framework", 356 "AVFoundation.framework",
334 "AudioToolbox.framework", 357 "AudioToolbox.framework",
335 "CoreGraphics.framework", 358 "CoreGraphics.framework",
336 "CoreMedia.framework", 359 "CoreMedia.framework",
337 "GLKit.framework", 360 "GLKit.framework",
338 "VideoToolbox.framework", 361 "VideoToolbox.framework",
362 "Metal.framework",
363 "MetalKit.framework",
339 ] 364 ]
340 365
341 configs += [ 366 configs += [
342 "..:common_objc", 367 "..:common_objc",
343 "//build/config/compiler:enable_arc", 368 "//build/config/compiler:enable_arc",
344 ] 369 ]
345 370
346 public_configs = [ ":rtc_sdk_common_objc_config" ] 371 public_configs = [ ":rtc_sdk_common_objc_config" ]
347 372
348 if (!build_with_chromium && is_clang) { 373 if (!build_with_chromium && is_clang) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 deps += [ "$rtc_libyuv_dir" ] 421 deps += [ "$rtc_libyuv_dir" ]
397 public_deps = [ 422 public_deps = [
398 "$rtc_libyuv_dir", 423 "$rtc_libyuv_dir",
399 ] 424 ]
400 } else { 425 } else {
401 # Need to add a directory normally exported by libyuv. 426 # Need to add a directory normally exported by libyuv.
402 include_dirs = [ "$rtc_libyuv_dir/include" ] 427 include_dirs = [ "$rtc_libyuv_dir/include" ]
403 } 428 }
404 } 429 }
405 } 430 }
OLDNEW
« 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