OLD | NEW |
---|---|
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 20 matching lines...) Expand all Loading... | |
40 "objc/Framework/Classes/NSString+StdString.h", | 41 "objc/Framework/Classes/NSString+StdString.h", |
41 "objc/Framework/Classes/NSString+StdString.mm", | 42 "objc/Framework/Classes/NSString+StdString.mm", |
42 "objc/Framework/Classes/RTCDispatcher.m", | 43 "objc/Framework/Classes/RTCDispatcher.m", |
43 "objc/Framework/Classes/RTCFieldTrials.mm", | 44 "objc/Framework/Classes/RTCFieldTrials.mm", |
44 "objc/Framework/Classes/RTCLogging.mm", | 45 "objc/Framework/Classes/RTCLogging.mm", |
45 "objc/Framework/Classes/RTCMetrics.mm", | 46 "objc/Framework/Classes/RTCMetrics.mm", |
46 "objc/Framework/Classes/RTCMetricsSampleInfo+Private.h", | 47 "objc/Framework/Classes/RTCMetricsSampleInfo+Private.h", |
47 "objc/Framework/Classes/RTCMetricsSampleInfo.mm", | 48 "objc/Framework/Classes/RTCMetricsSampleInfo.mm", |
48 "objc/Framework/Classes/RTCSSLAdapter.mm", | 49 "objc/Framework/Classes/RTCSSLAdapter.mm", |
49 "objc/Framework/Classes/RTCTracing.mm", | 50 "objc/Framework/Classes/RTCTracing.mm", |
51 "objc/Framework/Classes/metal/RTCMTLRenderer.mm", | |
52 "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.
| |
50 "objc/Framework/Headers/WebRTC/RTCDispatcher.h", | 53 "objc/Framework/Headers/WebRTC/RTCDispatcher.h", |
51 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h", | 54 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h", |
52 "objc/Framework/Headers/WebRTC/RTCLogging.h", | 55 "objc/Framework/Headers/WebRTC/RTCLogging.h", |
53 "objc/Framework/Headers/WebRTC/RTCMacros.h", | 56 "objc/Framework/Headers/WebRTC/RTCMacros.h", |
54 "objc/Framework/Headers/WebRTC/RTCMetrics.h", | 57 "objc/Framework/Headers/WebRTC/RTCMetrics.h", |
55 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h", | 58 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h", |
56 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", | 59 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", |
57 "objc/Framework/Headers/WebRTC/RTCTracing.h", | 60 "objc/Framework/Headers/WebRTC/RTCTracing.h", |
58 ] | 61 ] |
59 if (is_ios) { | 62 if (is_ios) { |
60 sources += [ | 63 sources += [ |
61 "objc/Framework/Classes/RTCCameraPreviewView.m", | 64 "objc/Framework/Classes/RTCCameraPreviewView.m", |
62 "objc/Framework/Classes/RTCUIApplication.h", | 65 "objc/Framework/Classes/RTCUIApplication.h", |
63 "objc/Framework/Classes/RTCUIApplication.mm", | 66 "objc/Framework/Classes/RTCUIApplication.mm", |
64 "objc/Framework/Classes/UIDevice+RTCDevice.mm", | 67 "objc/Framework/Classes/UIDevice+RTCDevice.mm", |
65 "objc/Framework/Classes/helpers.h", | 68 "objc/Framework/Classes/helpers.h", |
66 "objc/Framework/Classes/helpers.mm", | 69 "objc/Framework/Classes/helpers.mm", |
67 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h", | 70 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h", |
68 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", | 71 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", |
69 ] | 72 ] |
70 libs = [ "AVFoundation.framework" ] | 73 libs = [ |
74 "AVFoundation.framework", | |
75 "Metal.framework", | |
76 "MetalKit.framework", | |
77 ] | |
71 } | 78 } |
72 if (!build_with_chromium) { | 79 if (!build_with_chromium) { |
73 sources += [ | 80 sources += [ |
74 "objc/Framework/Classes/RTCFileLogger.mm", | 81 "objc/Framework/Classes/RTCFileLogger.mm", |
75 "objc/Framework/Headers/WebRTC/RTCFileLogger.h", | 82 "objc/Framework/Headers/WebRTC/RTCFileLogger.h", |
76 ] | 83 ] |
77 } | 84 } |
78 } | 85 } |
79 | 86 |
80 rtc_static_library("rtc_sdk_peerconnection_objc") { | 87 rtc_static_library("rtc_sdk_peerconnection_objc") { |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
258 | 265 |
259 defines = [ "GTEST_RELATIVE_PATH" ] | 266 defines = [ "GTEST_RELATIVE_PATH" ] |
260 if (!build_with_chromium && is_clang) { | 267 if (!build_with_chromium && is_clang) { |
261 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) . | 268 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) . |
262 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 269 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
263 } | 270 } |
264 } | 271 } |
265 } | 272 } |
266 | 273 |
267 if (is_ios) { | 274 if (is_ios) { |
275 compile_metal_lib("metal_lib") { | |
276 source = "objc/Framework/Classes/metal/Shaders.metal" | |
277 } | |
278 | |
279 bundle_data("metal_bundle") { | |
280 public_deps = [ | |
281 ":metal_lib", | |
282 ] | |
283 metal_sources = get_target_outputs(":metal_lib") | |
284 sources = metal_sources | |
285 outputs = [ | |
286 "{{bundle_root_dir}}//rtc_shaders.metallib", | |
287 ] | |
288 } | |
289 | |
268 ios_framework_bundle("rtc_sdk_framework_objc") { | 290 ios_framework_bundle("rtc_sdk_framework_objc") { |
269 info_plist = "objc/Framework/Info.plist" | 291 info_plist = "objc/Framework/Info.plist" |
270 output_name = "WebRTC" | 292 output_name = "WebRTC" |
271 | 293 |
272 common_objc_headers = [ | 294 common_objc_headers = [ |
273 "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h", | 295 "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h", |
274 "objc/Framework/Headers/WebRTC/RTCAudioSource.h", | 296 "objc/Framework/Headers/WebRTC/RTCAudioSource.h", |
275 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h", | 297 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h", |
276 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h", | 298 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h", |
277 "objc/Framework/Headers/WebRTC/RTCConfiguration.h", | 299 "objc/Framework/Headers/WebRTC/RTCConfiguration.h", |
(...skipping 22 matching lines...) Expand all Loading... | |
300 "objc/Framework/Headers/WebRTC/RTCRtpSender.h", | 322 "objc/Framework/Headers/WebRTC/RTCRtpSender.h", |
301 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", | 323 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", |
302 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h", | 324 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h", |
303 "objc/Framework/Headers/WebRTC/RTCTracing.h", | 325 "objc/Framework/Headers/WebRTC/RTCTracing.h", |
304 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h", | 326 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h", |
305 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h", | 327 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h", |
306 "objc/Framework/Headers/WebRTC/RTCVideoSource.h", | 328 "objc/Framework/Headers/WebRTC/RTCVideoSource.h", |
307 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h", | 329 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h", |
308 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", | 330 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", |
309 "objc/Framework/Headers/WebRTC/WebRTC.h", | 331 "objc/Framework/Headers/WebRTC/WebRTC.h", |
332 "objc/Framework/Headers/WebRTC/RTCMTLRenderer.h", | |
333 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h", | |
310 ] | 334 ] |
311 | 335 |
312 sources = common_objc_headers | 336 sources = common_objc_headers |
313 public_headers = common_objc_headers | 337 public_headers = common_objc_headers |
314 | 338 |
315 if (!build_with_chromium) { | 339 if (!build_with_chromium) { |
316 sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] | 340 sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] |
317 public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] | 341 public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] |
318 } | 342 } |
319 | 343 |
320 ldflags = [ | 344 ldflags = [ |
321 "-all_load", | 345 "-all_load", |
322 "-install_name", | 346 "-install_name", |
323 "@rpath/$output_name.framework/$output_name", | 347 "@rpath/$output_name.framework/$output_name", |
324 ] | 348 ] |
325 | 349 |
326 deps = [ | 350 deps = [ |
351 ":metal_bundle", | |
327 ":rtc_sdk_peerconnection_objc", | 352 ":rtc_sdk_peerconnection_objc", |
328 "../system_wrappers:field_trial_default", | 353 "../system_wrappers:field_trial_default", |
329 "../system_wrappers:metrics_default", | 354 "../system_wrappers:metrics_default", |
330 ] | 355 ] |
331 | 356 |
332 libs = [ | 357 libs = [ |
333 "AVFoundation.framework", | 358 "AVFoundation.framework", |
334 "AudioToolbox.framework", | 359 "AudioToolbox.framework", |
335 "CoreGraphics.framework", | 360 "CoreGraphics.framework", |
336 "CoreMedia.framework", | 361 "CoreMedia.framework", |
337 "GLKit.framework", | 362 "GLKit.framework", |
338 "VideoToolbox.framework", | 363 "VideoToolbox.framework", |
364 "Metal.framework", | |
365 "MetalKit.framework", | |
339 ] | 366 ] |
340 | 367 |
341 configs += [ | 368 configs += [ |
342 "..:common_objc", | 369 "..:common_objc", |
343 "//build/config/compiler:enable_arc", | 370 "//build/config/compiler:enable_arc", |
344 ] | 371 ] |
345 | 372 |
346 public_configs = [ ":rtc_sdk_common_objc_config" ] | 373 public_configs = [ ":rtc_sdk_common_objc_config" ] |
347 | 374 |
348 if (!build_with_chromium && is_clang) { | 375 if (!build_with_chromium && is_clang) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
396 deps += [ "$rtc_libyuv_dir" ] | 423 deps += [ "$rtc_libyuv_dir" ] |
397 public_deps = [ | 424 public_deps = [ |
398 "$rtc_libyuv_dir", | 425 "$rtc_libyuv_dir", |
399 ] | 426 ] |
400 } else { | 427 } else { |
401 # Need to add a directory normally exported by libyuv. | 428 # Need to add a directory normally exported by libyuv. |
402 include_dirs = [ "$rtc_libyuv_dir/include" ] | 429 include_dirs = [ "$rtc_libyuv_dir/include" ] |
403 } | 430 } |
404 } | 431 } |
405 } | 432 } |
OLD | NEW |