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 if (is_ios) { | 10 if (is_ios) { |
(...skipping 10 matching lines...) Expand all Loading... | |
21 | 21 |
22 if (is_ios || is_mac) { | 22 if (is_ios || is_mac) { |
23 config("rtc_sdk_common_objc_config") { | 23 config("rtc_sdk_common_objc_config") { |
24 include_dirs = [ | 24 include_dirs = [ |
25 "objc/Framework/Classes", | 25 "objc/Framework/Classes", |
26 "objc/Framework/Headers", | 26 "objc/Framework/Headers", |
27 ] | 27 ] |
28 } | 28 } |
29 | 29 |
30 rtc_static_library("rtc_sdk_common_objc") { | 30 rtc_static_library("rtc_sdk_common_objc") { |
31 deps = [ | |
32 "../base:rtc_base", | |
33 ] | |
34 configs += [ | |
35 "..:common_objc", | |
36 "//build/config/compiler:enable_arc", | |
37 ] | |
38 public_configs = [ ":rtc_sdk_common_objc_config" ] | |
39 sources = [ | 31 sources = [ |
40 "objc/Framework/Classes/NSString+StdString.h", | 32 "objc/Framework/Classes/NSString+StdString.h", |
41 "objc/Framework/Classes/NSString+StdString.mm", | 33 "objc/Framework/Classes/NSString+StdString.mm", |
42 "objc/Framework/Classes/RTCDispatcher.m", | 34 "objc/Framework/Classes/RTCDispatcher.m", |
43 "objc/Framework/Classes/RTCFieldTrials.mm", | 35 "objc/Framework/Classes/RTCFieldTrials.mm", |
44 "objc/Framework/Classes/RTCLogging.mm", | 36 "objc/Framework/Classes/RTCLogging.mm", |
45 "objc/Framework/Classes/RTCMetrics.mm", | 37 "objc/Framework/Classes/RTCMetrics.mm", |
46 "objc/Framework/Classes/RTCMetricsSampleInfo+Private.h", | 38 "objc/Framework/Classes/RTCMetricsSampleInfo+Private.h", |
47 "objc/Framework/Classes/RTCMetricsSampleInfo.mm", | 39 "objc/Framework/Classes/RTCMetricsSampleInfo.mm", |
48 "objc/Framework/Classes/RTCSSLAdapter.mm", | 40 "objc/Framework/Classes/RTCSSLAdapter.mm", |
49 "objc/Framework/Classes/RTCTracing.mm", | 41 "objc/Framework/Classes/RTCTracing.mm", |
50 "objc/Framework/Classes/helpers.h", | 42 "objc/Framework/Classes/helpers.h", |
51 "objc/Framework/Classes/helpers.mm", | 43 "objc/Framework/Classes/helpers.mm", |
52 "objc/Framework/Headers/WebRTC/RTCDispatcher.h", | 44 "objc/Framework/Headers/WebRTC/RTCDispatcher.h", |
53 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h", | 45 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h", |
54 "objc/Framework/Headers/WebRTC/RTCLogging.h", | 46 "objc/Framework/Headers/WebRTC/RTCLogging.h", |
55 "objc/Framework/Headers/WebRTC/RTCMacros.h", | 47 "objc/Framework/Headers/WebRTC/RTCMacros.h", |
56 "objc/Framework/Headers/WebRTC/RTCMetrics.h", | 48 "objc/Framework/Headers/WebRTC/RTCMetrics.h", |
57 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h", | 49 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h", |
58 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", | 50 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", |
59 "objc/Framework/Headers/WebRTC/RTCTracing.h", | 51 "objc/Framework/Headers/WebRTC/RTCTracing.h", |
60 ] | 52 ] |
53 configs += [ | |
54 "..:common_objc", | |
55 "//build/config/compiler:enable_arc", | |
56 ] | |
57 public_configs = [ ":rtc_sdk_common_objc_config" ] | |
58 deps = [ | |
59 "../base:rtc_base", | |
60 "../system_wrappers:field_trial_default", | |
61 "../system_wrappers:metrics_default", | |
62 ] | |
61 if (is_ios) { | 63 if (is_ios) { |
62 sources += [ | 64 sources += [ |
63 "objc/Framework/Classes/RTCCameraPreviewView.m", | 65 "objc/Framework/Classes/RTCCameraPreviewView.m", |
64 "objc/Framework/Classes/RTCUIApplication.h", | 66 "objc/Framework/Classes/RTCUIApplication.h", |
65 "objc/Framework/Classes/RTCUIApplication.mm", | 67 "objc/Framework/Classes/RTCUIApplication.mm", |
66 "objc/Framework/Classes/UIDevice+RTCDevice.mm", | 68 "objc/Framework/Classes/UIDevice+RTCDevice.mm", |
67 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h", | 69 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h", |
68 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", | 70 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", |
69 ] | 71 ] |
70 if (current_cpu == "arm64") { | 72 if (current_cpu == "arm64") { |
71 sources += [ | 73 sources += [ |
72 "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.h", | 74 "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.h", |
73 "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.mm", | 75 "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.mm", |
74 "objc/Framework/Classes/Metal/RTCMTLVideoView.m", | 76 "objc/Framework/Classes/Metal/RTCMTLVideoView.m", |
75 ] | 77 ] |
78 deps += [ "../api:video_frame_api" ] | |
76 } | 79 } |
77 | 80 |
78 libs = [ "AVFoundation.framework" ] | 81 libs = [ "AVFoundation.framework" ] |
79 if (current_cpu == "arm64") { | 82 if (current_cpu == "arm64") { |
80 libs += [ | 83 libs += [ |
81 "CoreVideo.framework", | 84 "CoreVideo.framework", |
82 "Metal.framework", | 85 "Metal.framework", |
83 "MetalKit.framework", | 86 "MetalKit.framework", |
84 ] | 87 ] |
85 } | 88 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h", | 192 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h", |
190 "objc/Framework/Headers/WebRTC/RTCRtpSender.h", | 193 "objc/Framework/Headers/WebRTC/RTCRtpSender.h", |
191 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h", | 194 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h", |
192 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h", | 195 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h", |
193 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h", | 196 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h", |
194 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h", | 197 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h", |
195 "objc/Framework/Headers/WebRTC/RTCVideoSource.h", | 198 "objc/Framework/Headers/WebRTC/RTCVideoSource.h", |
196 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h", | 199 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h", |
197 ] | 200 ] |
198 | 201 |
202 configs += [ | |
203 "..:common_objc", | |
204 "//build/config/compiler:enable_arc", | |
205 ] | |
206 | |
207 public_configs = [ ":rtc_sdk_common_objc_config" ] | |
208 | |
199 deps = [ | 209 deps = [ |
200 ":webrtc_h264_video_toolbox", | 210 ":webrtc_h264_video_toolbox", |
211 "../api:video_frame_api", | |
212 "../base:rtc_base", | |
213 "../base:rtc_base_approved", | |
214 "../common_video:common_video", | |
magjed_webrtc
2017/04/13 09:30:37
Remove unnecessary common_video.
mbonadei
2017/04/19 09:41:42
Done.
| |
215 "../media:rtc_media", | |
216 "../media:rtc_media_base", | |
217 "../system_wrappers:system_wrappers", | |
magjed_webrtc
2017/04/13 09:30:37
Remove unnecessary system_wrappers.
mbonadei
2017/04/19 09:41:42
Done.
| |
201 ] | 218 ] |
202 | 219 |
203 if (is_ios) { | 220 if (is_ios) { |
204 sources += [ | 221 sources += [ |
205 "objc/Framework/Classes/RTCEAGLVideoView.m", | 222 "objc/Framework/Classes/RTCEAGLVideoView.m", |
206 "objc/Framework/Classes/RTCNativeNV12Shader.mm", | 223 "objc/Framework/Classes/RTCNativeNV12Shader.mm", |
207 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h", | 224 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h", |
208 ] | 225 ] |
209 libs = [ | 226 libs = [ |
210 "CoreGraphics.framework", | 227 "CoreGraphics.framework", |
(...skipping 14 matching lines...) Expand all Loading... | |
225 ] | 242 ] |
226 libs = [ | 243 libs = [ |
227 "CoreVideo.framework", | 244 "CoreVideo.framework", |
228 "CoreMedia.framework", | 245 "CoreMedia.framework", |
229 "OpenGL.framework", | 246 "OpenGL.framework", |
230 "Metal.framework", | 247 "Metal.framework", |
231 "MetalKit.framework", | 248 "MetalKit.framework", |
232 ] | 249 ] |
233 } | 250 } |
234 | 251 |
235 configs += [ | |
236 "..:common_objc", | |
237 "//build/config/compiler:enable_arc", | |
238 ] | |
239 | |
240 public_configs = [ ":rtc_sdk_common_objc_config" ] | |
241 | |
242 if (!build_with_chromium && is_clang) { | 252 if (!build_with_chromium && is_clang) { |
243 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 253 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
244 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 254 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
245 } | 255 } |
246 | 256 |
247 libs += [ "AVFoundation.framework" ] | 257 libs += [ "AVFoundation.framework" ] |
248 | 258 |
249 deps += [ | 259 deps += [ |
250 ":rtc_sdk_common_objc", | 260 ":rtc_sdk_common_objc", |
251 "../pc:libjingle_peerconnection", | 261 "../pc:libjingle_peerconnection", |
(...skipping 19 matching lines...) Expand all Loading... | |
271 "objc/Framework/UnitTests/RTCPeerConnectionTest.mm", | 281 "objc/Framework/UnitTests/RTCPeerConnectionTest.mm", |
272 "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm", | 282 "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm", |
273 "objc/Framework/UnitTests/avformatmappertests.mm", | 283 "objc/Framework/UnitTests/avformatmappertests.mm", |
274 ] | 284 ] |
275 if (is_ios) { | 285 if (is_ios) { |
276 sources += [ "objc/Framework/UnitTests/RTCMTLVideoViewTests.mm" ] | 286 sources += [ "objc/Framework/UnitTests/RTCMTLVideoViewTests.mm" ] |
277 if (current_cpu != "arm64") { | 287 if (current_cpu != "arm64") { |
278 sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ] | 288 sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ] |
279 } | 289 } |
280 } | 290 } |
281 deps = [ | |
282 ":rtc_sdk_peerconnection_objc", | |
283 "//third_party/ocmock", | |
284 "//webrtc/system_wrappers:system_wrappers_default", | |
285 ] | |
286 | 291 |
287 # TODO(tkchin): Cleanup this warning. | 292 # TODO(tkchin): Cleanup this warning. |
288 cflags = [ "-Wno-objc-property-no-attribute" ] | 293 cflags = [ "-Wno-objc-property-no-attribute" ] |
289 | 294 |
290 # |-ObjC| flag needed to make sure category method implementations | 295 # |-ObjC| flag needed to make sure category method implementations |
291 # are included: | 296 # are included: |
292 # https://developer.apple.com/library/mac/qa/qa1490/_index.html | 297 # https://developer.apple.com/library/mac/qa/qa1490/_index.html |
293 ldflags = [ "-ObjC" ] | 298 ldflags = [ "-ObjC" ] |
294 | 299 |
295 defines = [ "GTEST_RELATIVE_PATH" ] | 300 defines = [ "GTEST_RELATIVE_PATH" ] |
301 deps = [ | |
302 ":rtc_sdk_peerconnection_objc", | |
303 "../base:rtc_base_tests_utils", | |
304 "//third_party/ocmock", | |
305 "//webrtc/system_wrappers:system_wrappers_default", | |
306 ] | |
307 | |
296 if (!build_with_chromium && is_clang) { | 308 if (!build_with_chromium && is_clang) { |
297 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) . | 309 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) . |
298 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 310 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
299 } | 311 } |
300 } | 312 } |
301 } | 313 } |
302 | 314 |
303 if (is_ios) { | 315 if (is_ios) { |
304 ios_framework_bundle("rtc_sdk_framework_objc") { | 316 ios_framework_bundle("rtc_sdk_framework_objc") { |
305 info_plist = "objc/Framework/Info.plist" | 317 info_plist = "objc/Framework/Info.plist" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
353 sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] | 365 sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] |
354 public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] | 366 public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] |
355 } | 367 } |
356 | 368 |
357 ldflags = [ | 369 ldflags = [ |
358 "-all_load", | 370 "-all_load", |
359 "-install_name", | 371 "-install_name", |
360 "@rpath/$output_name.framework/$output_name", | 372 "@rpath/$output_name.framework/$output_name", |
361 ] | 373 ] |
362 | 374 |
375 configs += [ | |
376 "..:common_objc", | |
377 "//build/config/compiler:enable_arc", | |
378 ] | |
379 | |
380 public_configs = [ ":rtc_sdk_common_objc_config" ] | |
381 | |
363 deps = [ | 382 deps = [ |
364 ":rtc_sdk_peerconnection_objc", | 383 ":rtc_sdk_peerconnection_objc", |
365 "../system_wrappers:field_trial_default", | 384 "../system_wrappers:field_trial_default", |
366 "../system_wrappers:metrics_default", | 385 "../system_wrappers:metrics_default", |
367 ] | 386 ] |
368 | 387 |
369 libs = [ | 388 libs = [ |
370 "AVFoundation.framework", | 389 "AVFoundation.framework", |
371 "AudioToolbox.framework", | 390 "AudioToolbox.framework", |
372 "CoreGraphics.framework", | 391 "CoreGraphics.framework", |
373 "CoreMedia.framework", | 392 "CoreMedia.framework", |
374 "GLKit.framework", | 393 "GLKit.framework", |
375 "VideoToolbox.framework", | 394 "VideoToolbox.framework", |
376 ] | 395 ] |
377 | 396 |
378 configs += [ | |
379 "..:common_objc", | |
380 "//build/config/compiler:enable_arc", | |
381 ] | |
382 | |
383 public_configs = [ ":rtc_sdk_common_objc_config" ] | |
384 | |
385 if (!build_with_chromium && is_clang) { | 397 if (!build_with_chromium && is_clang) { |
386 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) | 398 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) |
387 configs -= [ "//build/config/clang:find_bad_constructs" ] | 399 configs -= [ "//build/config/clang:find_bad_constructs" ] |
388 } | 400 } |
389 } | 401 } |
390 } | 402 } |
391 | 403 |
392 rtc_static_library("rtc_sdk_objc") { | 404 rtc_static_library("rtc_sdk_objc") { |
393 complete_static_lib = true | 405 complete_static_lib = true |
394 deps = [ | 406 deps = [ |
(...skipping 13 matching lines...) Expand all Loading... | |
408 "objc/Framework/Classes/h264_video_toolbox_nalu.h", | 420 "objc/Framework/Classes/h264_video_toolbox_nalu.h", |
409 ] | 421 ] |
410 | 422 |
411 configs += [ | 423 configs += [ |
412 "//webrtc:common_objc", | 424 "//webrtc:common_objc", |
413 "//build/config/compiler:enable_arc", | 425 "//build/config/compiler:enable_arc", |
414 ] | 426 ] |
415 | 427 |
416 deps = [ | 428 deps = [ |
417 ":rtc_sdk_common_objc", | 429 ":rtc_sdk_common_objc", |
430 "../api:video_frame_api", | |
431 "../base:rtc_base_approved", | |
432 "../common_video", | |
433 "../media:rtc_media_base", | |
434 "../modules/video_coding:video_coding_utility", | |
435 "../modules/video_coding:webrtc_h264", | |
436 "../system_wrappers", | |
418 ] | 437 ] |
419 | 438 |
420 libs = [ | 439 libs = [ |
421 "CoreFoundation.framework", | 440 "CoreFoundation.framework", |
422 "CoreMedia.framework", | 441 "CoreMedia.framework", |
423 "CoreVideo.framework", | 442 "CoreVideo.framework", |
424 "VideoToolbox.framework", | 443 "VideoToolbox.framework", |
425 ] | 444 ] |
426 | 445 |
427 if (!build_with_chromium && is_clang) { | 446 if (!build_with_chromium && is_clang) { |
428 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 447 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
429 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 448 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
430 } | 449 } |
431 | 450 |
432 if (rtc_build_libyuv) { | 451 if (rtc_build_libyuv) { |
433 deps += [ "$rtc_libyuv_dir" ] | 452 deps += [ "$rtc_libyuv_dir" ] |
434 public_deps = [ | 453 public_deps = [ |
435 "$rtc_libyuv_dir", | 454 "$rtc_libyuv_dir", |
436 ] | 455 ] |
437 } else { | 456 } else { |
438 # Need to add a directory normally exported by libyuv. | 457 # Need to add a directory normally exported by libyuv. |
439 include_dirs = [ "$rtc_libyuv_dir/include" ] | 458 include_dirs = [ "$rtc_libyuv_dir/include" ] |
440 } | 459 } |
441 } | 460 } |
442 } | 461 } |
OLD | NEW |