blob: 890c4f97dc0a04b23ad4d75fe11e6895f9aa84ae [file] [log] [blame]
tkchin9eeb6242016-04-27 01:54:20 -07001# Copyright 2016 The WebRTC project authors. All Rights Reserved.
2#
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
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
kthelgasonebc34e72016-09-15 04:30:18 -070010if (is_ios) {
11 import("//build/config/ios/rules.gni")
oprypin45197522017-06-22 01:47:20 -070012 import("//build/config/ios/ios_sdk.gni")
kthelgasonebc34e72016-09-15 04:30:18 -070013}
tkchin9eeb6242016-04-27 01:54:20 -070014
kthelgason2f088792017-05-30 01:48:47 -070015declare_args() {
16 # Determine whether or not to include metal rendering
17 rtc_use_metal_rendering = is_mac || (is_ios && current_cpu == "arm64")
18}
19
kjellander6ceab082016-10-28 05:44:03 -070020group("sdk") {
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020021 public_deps = []
22 if (!build_with_chromium) {
23 if (is_android) {
24 public_deps += [ "android" ]
25 }
26 if (is_ios) {
kthelgason36d658d2017-08-24 05:43:45 -070027 public_deps += [ ":framework_objc" ]
Henrik Kjellandera7d0df72017-06-27 08:56:46 +020028 }
kjellander6ceab082016-10-28 05:44:03 -070029 }
30}
31
kthelgasoncc2d1c62016-11-09 07:44:27 -080032if (is_ios || is_mac) {
kthelgason36d658d2017-08-24 05:43:45 -070033 config("common_config_objc") {
kjellander080a1e32016-05-25 11:37:11 -070034 include_dirs = [
35 "objc/Framework/Classes",
kthelgason2f088792017-05-30 01:48:47 -070036 "objc/Framework/Classes/Audio",
37 "objc/Framework/Classes/Common",
38 "objc/Framework/Classes/Metal",
39 "objc/Framework/Classes/PeerConnection",
40 "objc/Framework/Classes/UI",
41 "objc/Framework/Classes/Video",
42 "objc/Framework/Classes/VideoToolbox",
kjellander080a1e32016-05-25 11:37:11 -070043 "objc/Framework/Headers",
44 ]
Kári Tristan Helgason47d3a012017-10-24 15:28:51 +020045 cflags = [
46 "-Wstrict-overflow",
47 "-Wmissing-field-initializers",
48 ]
kjellander080a1e32016-05-25 11:37:11 -070049 }
50
kthelgason36d658d2017-08-24 05:43:45 -070051 rtc_static_library("common_objc") {
tkchin9eeb6242016-04-27 01:54:20 -070052 sources = [
kthelgason2f088792017-05-30 01:48:47 -070053 "objc/Framework/Classes/Common/NSString+StdString.h",
54 "objc/Framework/Classes/Common/NSString+StdString.mm",
55 "objc/Framework/Classes/Common/RTCDispatcher+Private.h",
56 "objc/Framework/Classes/Common/RTCDispatcher.m",
57 "objc/Framework/Classes/Common/RTCFieldTrials.mm",
58 "objc/Framework/Classes/Common/RTCLogging.mm",
Anders Carlssonfc309752017-06-12 14:16:20 +020059 "objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.h",
60 "objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m",
kthelgason2f088792017-05-30 01:48:47 -070061 "objc/Framework/Classes/Common/helpers.h",
62 "objc/Framework/Classes/Common/helpers.mm",
Kári Tristan Helgasona17ddcd2017-09-28 19:28:52 +020063 "objc/Framework/Classes/Common/scoped_cftyperef.h",
tkchin9eeb6242016-04-27 01:54:20 -070064 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
65 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
66 "objc/Framework/Headers/WebRTC/RTCLogging.h",
67 "objc/Framework/Headers/WebRTC/RTCMacros.h",
tkchin9eeb6242016-04-27 01:54:20 -070068 ]
denicijad2088152017-04-28 02:14:54 -070069
mbonadei1e060c62017-04-21 00:02:02 -070070 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -070071 "../rtc_base:rtc_base",
mbonadei1e060c62017-04-21 00:02:02 -070072 ]
kthelgasonc0977102017-04-24 00:57:16 -070073 configs += [ "..:common_objc" ]
74
kthelgason36d658d2017-08-24 05:43:45 -070075 public_configs = [ ":common_config_objc" ]
denicijad2088152017-04-28 02:14:54 -070076
kjellander3bcedd32016-06-08 01:14:15 -070077 if (is_ios) {
78 sources += [
kthelgason2f088792017-05-30 01:48:47 -070079 "objc/Framework/Classes/Common/UIDevice+RTCDevice.mm",
tkchind7629102016-07-28 14:52:55 -070080 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
kjellander3bcedd32016-06-08 01:14:15 -070081 ]
denicijad2088152017-04-28 02:14:54 -070082 }
83
kthelgason2f088792017-05-30 01:48:47 -070084 if (!build_with_chromium) {
denicijad2088152017-04-28 02:14:54 -070085 sources += [
kthelgason2f088792017-05-30 01:48:47 -070086 "objc/Framework/Classes/Common/RTCFileLogger.mm",
87 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
88 ]
89 }
90 }
91
mbonadei2c8ac1b2017-05-31 05:14:26 -070092 if (!build_with_chromium) {
kthelgason36d658d2017-08-24 05:43:45 -070093 rtc_static_library("audio_objc") {
denicija59ee91b2017-06-05 05:48:47 -070094 sources = [
95 "objc/Framework/Classes/Audio/RTCAudioSession+Configuration.mm",
96 "objc/Framework/Classes/Audio/RTCAudioSession+Private.h",
97 "objc/Framework/Classes/Audio/RTCAudioSession.mm",
98 "objc/Framework/Classes/Audio/RTCAudioSessionConfiguration.m",
99 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
100 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
101 ]
102 configs += [ "..:common_objc" ]
103
Anders Carlsson8ecfd802017-09-15 14:07:30 +0200104 public_configs = [ ":common_config_objc" ]
105
denicija59ee91b2017-06-05 05:48:47 -0700106 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700107 ":common_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700108 "../rtc_base:rtc_base_approved",
denicija59ee91b2017-06-05 05:48:47 -0700109 ]
110
111 if (is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -0700112 # Suppress warnings from the Chromium Clang plugin
113 # (bugs.webrtc.org/163).
denicija59ee91b2017-06-05 05:48:47 -0700114 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
115 }
116 }
zhihuanga4c113a2017-06-28 14:05:44 -0700117
118 # Keep videotracksource related code in a separate target so that we can
119 # build PeerConnectionFactory without audio/video support when that's called
120 # for.
kthelgason36d658d2017-08-24 05:43:45 -0700121 rtc_static_library("videotracksource_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700122 sources = [
123 "objc/Framework/Classes/Video/RTCCVPixelBuffer.mm",
124 "objc/Framework/Classes/Video/RTCI420Buffer+Private.h",
125 "objc/Framework/Classes/Video/RTCI420Buffer.mm",
126 "objc/Framework/Classes/Video/objc_frame_buffer.h",
127 "objc/Framework/Classes/Video/objc_frame_buffer.mm",
128 "objc/Framework/Classes/Video/objcvideotracksource.h",
129 "objc/Framework/Classes/Video/objcvideotracksource.mm",
130 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
131 ]
132
133 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700134 ":common_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700135 "../api:libjingle_peerconnection_api",
136 "../api:video_frame_api",
zhihuanga4c113a2017-06-28 14:05:44 -0700137 "../common_video",
138 "../media:rtc_media_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700139 "../rtc_base:rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700140 ]
141
142 configs += [ "..:common_objc" ]
143 if (!build_with_chromium && is_clang) {
144 # Suppress warnings from the Chromium Clang plugin
145 # (bugs.webrtc.org/163).
146 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
147 }
148 }
149
kthelgason36d658d2017-08-24 05:43:45 -0700150 rtc_static_library("video_objc") {
kthelgason2f088792017-05-30 01:48:47 -0700151 sources = [
jtteh3b673c62017-07-25 15:48:39 -0700152 "objc/Framework/Classes/Video/AVCaptureSession+DevicePosition.h",
153 "objc/Framework/Classes/Video/AVCaptureSession+DevicePosition.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700154 "objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.h",
155 "objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.mm",
156 "objc/Framework/Classes/Video/RTCDefaultShader.h",
157 "objc/Framework/Classes/Video/RTCDefaultShader.mm",
158 "objc/Framework/Classes/Video/RTCI420TextureCache.h",
159 "objc/Framework/Classes/Video/RTCI420TextureCache.mm",
160 "objc/Framework/Classes/Video/RTCOpenGLDefines.h",
161 "objc/Framework/Classes/Video/RTCShader.h",
162 "objc/Framework/Classes/Video/RTCShader.mm",
163 "objc/Framework/Classes/Video/avfoundationformatmapper.h",
164 "objc/Framework/Classes/Video/avfoundationformatmapper.mm",
165 "objc/Framework/Classes/Video/avfoundationvideocapturer.h",
166 "objc/Framework/Classes/Video/avfoundationvideocapturer.mm",
kthelgason2f088792017-05-30 01:48:47 -0700167 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700168 libs = []
denicijad2088152017-04-28 02:14:54 -0700169 if (is_ios) {
denicija070d5e32017-02-26 11:44:13 -0800170 sources += [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700171 "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
172 "objc/Framework/Classes/Video/RTCNV12TextureCache.m",
173 ]
174 libs += [
175 "GLKit.framework",
176 "OpenGLES.framework",
177 "QuartzCore.framework",
178 ]
179 } else if (is_mac) {
180 sources += []
181
182 libs += [
183 "CoreMedia.framework",
184 "CoreVideo.framework",
185 "OpenGL.framework",
denicija070d5e32017-02-26 11:44:13 -0800186 ]
187 }
mbonadei2c8ac1b2017-05-31 05:14:26 -0700188
kthelgason2f088792017-05-30 01:48:47 -0700189 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700190 ":common_objc",
191 ":videotracksource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700192 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700193 "../api:optional",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700194 "../common_video",
195 "../media:rtc_media_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700196 "../rtc_base:rtc_base",
tkchin9eeb6242016-04-27 01:54:20 -0700197 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700198
kthelgason2f088792017-05-30 01:48:47 -0700199 configs += [ "..:common_objc" ]
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800200 if (!build_with_chromium && is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -0700201 # Suppress warnings from the Chromium Clang plugin
202 # (bugs.webrtc.org/163).
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800203 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
204 }
205 }
ehmaldonadoda8dcfb2017-01-04 07:11:23 -0800206
kthelgason36d658d2017-08-24 05:43:45 -0700207 rtc_static_library("ui_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700208 if (is_ios) {
209 sources = [
210 "objc/Framework/Classes/UI/RTCCameraPreviewView.m",
211 "objc/Framework/Classes/UI/RTCEAGLVideoView.m",
212 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
213 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
214 ]
215 }
216 if (is_mac) {
217 sources = [
218 "objc/Framework/Classes/UI/RTCNSGLVideoView.m",
219 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
220 ]
221 }
222 configs += [ "..:common_objc" ]
223 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700224 ":common_objc",
225 ":peerconnection_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700226 ]
227 }
kthelgasonebc34e72016-09-15 04:30:18 -0700228
mbonadei2c8ac1b2017-05-31 05:14:26 -0700229 if (rtc_use_metal_rendering) {
kthelgason36d658d2017-08-24 05:43:45 -0700230 rtc_static_library("metal_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700231 sources = [
232 "objc/Framework/Classes/Metal/RTCMTLI420Renderer.h",
233 "objc/Framework/Classes/Metal/RTCMTLI420Renderer.mm",
234 "objc/Framework/Classes/Metal/RTCMTLRenderer+Private.h",
235 "objc/Framework/Classes/Metal/RTCMTLRenderer.h",
236 "objc/Framework/Classes/Metal/RTCMTLRenderer.mm",
237 ]
238 if (is_ios) {
239 sources += [
240 "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.h",
241 "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.mm",
242 "objc/Framework/Classes/Metal/RTCMTLVideoView.m",
243 "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
244 ]
245 }
246 if (is_mac) {
247 sources += [
248 "objc/Framework/Classes/Metal/RTCMTLNSVideoView.m",
249 "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
250 ]
251 }
252 libs = [
253 "CoreVideo.framework",
254 "Metal.framework",
255 "MetalKit.framework",
256 ]
257 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700258 ":video_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700259 "../api:video_frame_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700260 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700261 ]
262 configs += [ "..:common_objc" ]
kthelgason36d658d2017-08-24 05:43:45 -0700263 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700264 }
265 }
266
kthelgason36d658d2017-08-24 05:43:45 -0700267 rtc_static_library("peerconnection_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700268 sources = [
269 "objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource+Private.h",
270 "objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700271 "objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m",
272 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
273 ]
274 if (is_ios) {
275 sources += [
276 "objc/Framework/Classes/PeerConnection/RTCFileVideoCapturer.h",
277 "objc/Framework/Classes/PeerConnection/RTCFileVideoCapturer.m",
278 ]
279 }
280 libs = [ "AVFoundation.framework" ]
281
282 if (is_ios) {
283 libs += [ "CoreGraphics.framework" ]
284 }
285
286 configs += [ "..:common_objc" ]
287
kthelgason36d658d2017-08-24 05:43:45 -0700288 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700289
290 if (!build_with_chromium && is_clang) {
291 # Suppress warnings from the Chromium Clang plugin
292 # (bugs.webrtc.org/163).
293 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
294 }
295
296 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700297 ":common_objc",
298 ":corevideoframebuffer_objc",
299 ":peerconnectionfactory_objc",
300 ":video_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700301 "../api:video_frame_api",
zhihuanga4c113a2017-06-28 14:05:44 -0700302 "../media:rtc_media_base",
303 "../pc:libjingle_peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700304 "../rtc_base:rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700305 ]
306
307 if (rtc_use_metal_rendering) {
kthelgason36d658d2017-08-24 05:43:45 -0700308 deps += [ ":metal_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700309 }
310
311 if (rtc_build_libyuv) {
312 deps += [ "$rtc_libyuv_dir" ]
313 public_deps = [
314 "$rtc_libyuv_dir",
315 ]
316 }
317 }
318
kthelgason36d658d2017-08-24 05:43:45 -0700319 rtc_static_library("peerconnectionfactory_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700320 sources = [
Anders Carlsson1d4c1522017-10-30 13:07:07 +0100321 "objc/Framework/Classes/PeerConnection/RTCDefaultVideoDecoderFactory.m",
322 "objc/Framework/Classes/PeerConnection/RTCDefaultVideoEncoderFactory.m",
magjedb8853ca2017-08-29 03:57:22 -0700323 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
zhihuanga4c113a2017-06-28 14:05:44 -0700324 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Private.h",
325 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory.mm",
kthelgasonfb143122017-07-25 07:55:58 -0700326 "objc/Framework/Classes/PeerConnection/RTCVideoCodecH264.mm",
zhihuanga4c113a2017-06-28 14:05:44 -0700327 ]
328
kthelgason36d658d2017-08-24 05:43:45 -0700329 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700330
331 if (!build_with_chromium && is_clang) {
332 # Suppress warnings from the Chromium Clang plugin
333 # (bugs.webrtc.org/163).
334 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
335 }
336
337 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700338 ":common_objc",
339 ":corevideoframebuffer_objc",
340 ":peerconnectionfactory_base_objc",
341 ":video_objc",
342 ":videotoolbox_objc",
343 ":videotracksource_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700344 "../api:video_frame_api",
magjedb8853ca2017-08-29 03:57:22 -0700345 "../api/audio_codecs:builtin_audio_decoder_factory",
346 "../api/audio_codecs:builtin_audio_encoder_factory",
kthelgasonfb143122017-07-25 07:55:58 -0700347 "../api/video_codecs:video_codecs_api",
348 "../media:rtc_audio_video",
zhihuanga4c113a2017-06-28 14:05:44 -0700349 "../media:rtc_media_base",
350 "../pc:create_pc_factory",
351 "../pc:peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700352 "../rtc_base:rtc_base",
kthelgasonfb143122017-07-25 07:55:58 -0700353 "../system_wrappers:field_trial_api",
zhihuanga4c113a2017-06-28 14:05:44 -0700354 ]
355 }
356
357 # Build the PeerConnectionFactory without audio/video support.
358 # This target depends on the objc_peeerconnectionfactory_base which still
359 # includes some audio/video related objects such as RTCAudioSource because
360 # these objects are just thin wrappers of native C++ interfaces required
361 # when implementing webrtc::PeerConnectionFactoryInterface and
362 # webrtc::PeerConnectionInterface.
363 # The applications which only use WebRTC DataChannel can depend on this
364 # target instead of rtc_sdk_objc.
kthelgason36d658d2017-08-24 05:43:45 -0700365 rtc_static_library("peerconnectionfactory_no_media_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700366 defines = [ "HAVE_NO_MEDIA" ]
367
368 sources = [
magjedb8853ca2017-08-29 03:57:22 -0700369 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h",
zhihuanga4c113a2017-06-28 14:05:44 -0700370 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Private.h",
371 "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory.mm",
372 ]
373
kthelgason36d658d2017-08-24 05:43:45 -0700374 public_configs = [ ":common_config_objc" ]
zhihuanga4c113a2017-06-28 14:05:44 -0700375
376 if (!build_with_chromium && is_clang) {
377 # Suppress warnings from the Chromium Clang plugin
378 # (bugs.webrtc.org/163).
379 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
380 }
381
382 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700383 ":peerconnectionfactory_base_objc",
zhihuanga4c113a2017-06-28 14:05:44 -0700384 "../api:libjingle_peerconnection_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700385 "../rtc_base:rtc_base",
zhihuanga4c113a2017-06-28 14:05:44 -0700386 ]
387 }
388
kthelgason36d658d2017-08-24 05:43:45 -0700389 rtc_static_library("peerconnectionfactory_base_objc") {
zhihuanga4c113a2017-06-28 14:05:44 -0700390 sources = [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700391 "objc/Framework/Classes/PeerConnection/RTCAudioSource+Private.h",
392 "objc/Framework/Classes/PeerConnection/RTCAudioSource.mm",
393 "objc/Framework/Classes/PeerConnection/RTCAudioTrack+Private.h",
394 "objc/Framework/Classes/PeerConnection/RTCAudioTrack.mm",
Zeke Chinef1140e2017-10-27 15:42:08 -0700395 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Native.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700396 "objc/Framework/Classes/PeerConnection/RTCConfiguration+Private.h",
397 "objc/Framework/Classes/PeerConnection/RTCConfiguration.mm",
398 "objc/Framework/Classes/PeerConnection/RTCDataChannel+Private.h",
399 "objc/Framework/Classes/PeerConnection/RTCDataChannel.mm",
400 "objc/Framework/Classes/PeerConnection/RTCDataChannelConfiguration+Private.h",
401 "objc/Framework/Classes/PeerConnection/RTCDataChannelConfiguration.mm",
kthelgasonfb143122017-07-25 07:55:58 -0700402 "objc/Framework/Classes/PeerConnection/RTCEncodedImage.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700403 "objc/Framework/Classes/PeerConnection/RTCIceCandidate+Private.h",
404 "objc/Framework/Classes/PeerConnection/RTCIceCandidate.mm",
405 "objc/Framework/Classes/PeerConnection/RTCIceServer+Private.h",
406 "objc/Framework/Classes/PeerConnection/RTCIceServer.mm",
Steve Antond295e402017-07-14 16:06:41 -0700407 "objc/Framework/Classes/PeerConnection/RTCIntervalRange+Private.h",
408 "objc/Framework/Classes/PeerConnection/RTCIntervalRange.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700409 "objc/Framework/Classes/PeerConnection/RTCLegacyStatsReport+Private.h",
410 "objc/Framework/Classes/PeerConnection/RTCLegacyStatsReport.mm",
411 "objc/Framework/Classes/PeerConnection/RTCMediaConstraints+Private.h",
412 "objc/Framework/Classes/PeerConnection/RTCMediaConstraints.mm",
413 "objc/Framework/Classes/PeerConnection/RTCMediaSource+Private.h",
414 "objc/Framework/Classes/PeerConnection/RTCMediaSource.mm",
415 "objc/Framework/Classes/PeerConnection/RTCMediaStream+Private.h",
416 "objc/Framework/Classes/PeerConnection/RTCMediaStream.mm",
417 "objc/Framework/Classes/PeerConnection/RTCMediaStreamTrack+Private.h",
418 "objc/Framework/Classes/PeerConnection/RTCMediaStreamTrack.mm",
419 "objc/Framework/Classes/PeerConnection/RTCMetrics.mm",
420 "objc/Framework/Classes/PeerConnection/RTCMetricsSampleInfo+Private.h",
421 "objc/Framework/Classes/PeerConnection/RTCMetricsSampleInfo.mm",
422 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+DataChannel.mm",
423 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Private.h",
424 "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Stats.mm",
425 "objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700426 "objc/Framework/Classes/PeerConnection/RTCRtpCodecParameters+Private.h",
427 "objc/Framework/Classes/PeerConnection/RTCRtpCodecParameters.mm",
428 "objc/Framework/Classes/PeerConnection/RTCRtpEncodingParameters+Private.h",
429 "objc/Framework/Classes/PeerConnection/RTCRtpEncodingParameters.mm",
kthelgasonfb143122017-07-25 07:55:58 -0700430 "objc/Framework/Classes/PeerConnection/RTCRtpFragmentationHeader.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700431 "objc/Framework/Classes/PeerConnection/RTCRtpParameters+Private.h",
432 "objc/Framework/Classes/PeerConnection/RTCRtpParameters.mm",
433 "objc/Framework/Classes/PeerConnection/RTCRtpReceiver+Private.h",
434 "objc/Framework/Classes/PeerConnection/RTCRtpReceiver.mm",
435 "objc/Framework/Classes/PeerConnection/RTCRtpSender+Private.h",
436 "objc/Framework/Classes/PeerConnection/RTCRtpSender.mm",
437 "objc/Framework/Classes/PeerConnection/RTCSSLAdapter.mm",
438 "objc/Framework/Classes/PeerConnection/RTCSessionDescription+Private.h",
439 "objc/Framework/Classes/PeerConnection/RTCSessionDescription.mm",
440 "objc/Framework/Classes/PeerConnection/RTCTracing.mm",
441 "objc/Framework/Classes/PeerConnection/RTCVideoCapturer.m",
kthelgasonfb143122017-07-25 07:55:58 -0700442 "objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h",
443 "objc/Framework/Classes/PeerConnection/RTCVideoCodec.mm",
Anders Carlsson7e042812017-10-05 16:55:38 +0200444 "objc/Framework/Classes/PeerConnection/RTCVideoCodecVP8.mm",
445 "objc/Framework/Classes/PeerConnection/RTCVideoCodecVP9.mm",
kthelgasonfb143122017-07-25 07:55:58 -0700446 "objc/Framework/Classes/PeerConnection/RTCVideoEncoderSettings.mm",
Anders Carlsson7e042812017-10-05 16:55:38 +0200447 "objc/Framework/Classes/PeerConnection/RTCVideoFrame+Private.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700448 "objc/Framework/Classes/PeerConnection/RTCVideoFrame.mm",
449 "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter+Private.h",
450 "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter.h",
451 "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter.mm",
452 "objc/Framework/Classes/PeerConnection/RTCVideoSource+Private.h",
453 "objc/Framework/Classes/PeerConnection/RTCVideoSource.mm",
454 "objc/Framework/Classes/PeerConnection/RTCVideoTrack+Private.h",
455 "objc/Framework/Classes/PeerConnection/RTCVideoTrack.mm",
Anders Carlsson7e042812017-10-05 16:55:38 +0200456 "objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoDecoder.h",
457 "objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoDecoder.mm",
458 "objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoEncoder.h",
459 "objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoEncoder.mm",
kthelgason5fe4d492016-12-05 11:27:30 -0800460 "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h",
Kári Tristan Helgasonf93f5a42017-05-31 10:04:55 +0200461 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
462 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800463 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
464 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
465 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800466 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
467 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
Steve Antond295e402017-07-14 16:06:41 -0700468 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800469 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800470 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
471 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
472 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
473 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
474 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
475 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
476 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
477 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
478 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
479 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
480 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
481 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
482 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
483 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
484 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
485 "objc/Framework/Headers/WebRTC/RTCTracing.h",
hewwattace5c882017-04-27 06:26:19 -0700486 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800487 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200488 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800489 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
490 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
491 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
magjed13941912017-05-30 06:11:58 -0700492 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
kthelgason5fe4d492016-12-05 11:27:30 -0800493 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700494
kthelgasonc0977102017-04-24 00:57:16 -0700495 configs += [ "..:common_objc" ]
496
kthelgason36d658d2017-08-24 05:43:45 -0700497 public_configs = [ ":common_config_objc" ]
kthelgasonc0977102017-04-24 00:57:16 -0700498
kjellandere40a7ee2016-10-16 23:56:12 -0700499 if (!build_with_chromium && is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -0700500 # Suppress warnings from the Chromium Clang plugin
501 # (bugs.webrtc.org/163).
mbonadei2c8ac1b2017-05-31 05:14:26 -0700502 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
503 }
504
505 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700506 ":common_objc",
507 ":corevideoframebuffer_objc",
508 ":videotracksource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700509 "../api:video_frame_api",
Anders Carlsson7e042812017-10-05 16:55:38 +0200510 "../api/video_codecs:video_codecs_api",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200511 "../common_video",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700512 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700513 "../modules:module_api",
Anders Carlsson7e042812017-10-05 16:55:38 +0200514 "../modules/video_coding:webrtc_vp8",
515 "../modules/video_coding:webrtc_vp9",
zhihuanga4c113a2017-06-28 14:05:44 -0700516 "../pc:peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700517 "../rtc_base:rtc_base",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700518 ]
kthelgasonebc34e72016-09-15 04:30:18 -0700519 }
Zeke Chindd0e1e02016-10-11 13:27:26 -0700520
mbonadei2c8ac1b2017-05-31 05:14:26 -0700521 if (rtc_include_tests) {
Danielaae012cf2017-10-12 13:46:00 +0200522 # TODO(denicija):remove second part of this check.
523 if (is_ios && (current_cpu == "arm64" || use_ios_simulator)) {
524 rtc_source_set("sdk_unittests_sources") {
525 testonly = true
526 include_dirs = [
527 "objc/Framework/Headers",
528 "objc/Framework/Classes",
529 ]
530 sources = [
531 # TODO(denicija): Once more sources are included,
532 # move the second part of the check on line 516 here
533 # when adding this file to the sources
534 "objc/Framework/UnitTests/RTCMTLVideoView_xctest.mm",
535 ]
536 if (use_ios_simulator) {
537 # Only include this file on simulator, as it's already
538 # included in device builds.
539 sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ]
540 libs = [ "CoreVideo.framework" ]
541 }
542 deps = [
543 ":common_objc",
544 ":peerconnection_objc",
545 ":peerconnectionfactory_objc",
546 ":videotoolbox_objc",
547 ":videotracksource_objc",
548 "..//system_wrappers:system_wrappers_default",
549 "../media:rtc_media_base",
550 "../modules:module_api",
551 "../rtc_base:rtc_base",
552 "../rtc_base:rtc_base_tests_utils",
553 "../system_wrappers:system_wrappers_default",
554 ]
555 public_deps = [
556 "//build/config/ios:xctest",
557 "//third_party/ocmock",
558 ]
559 }
560
561 rtc_ios_xctest_test("sdk_unittests") {
562 info_plist = "//test/ios/Info.plist"
563 sources = [
564 "objc/Framework/UnitTests/main.m",
565 ]
566 _bundle_id_suffix = ios_generic_test_bundle_id_suffix
567 extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
568 deps = [
569 ":sdk_unittests_sources",
570 ]
571 ldflags = [ "-all_load" ]
572 }
573 }
574
575 # TODO(denicija): once all tests are migrated to xctest remove this source set.
kthelgason36d658d2017-08-24 05:43:45 -0700576 rtc_source_set("sdk_unittests_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700577 testonly = true
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +0100578
mbonadei2c8ac1b2017-05-31 05:14:26 -0700579 # Skip restricting visibility on mobile platforms since the tests on those
580 # gets additional generated targets which would require many lines here to
581 # cover (which would be confusing to read and hard to maintain).
582 if (!is_android && !is_ios) {
583 visibility = [ "..:rtc_unittests" ]
584 }
585 sources = [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700586 "objc/Framework/UnitTests/RTCConfigurationTest.mm",
587 "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm",
588 "objc/Framework/UnitTests/RTCIceCandidateTest.mm",
589 "objc/Framework/UnitTests/RTCIceServerTest.mm",
Steve Antond295e402017-07-14 16:06:41 -0700590 "objc/Framework/UnitTests/RTCIntervalRangeTests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700591 "objc/Framework/UnitTests/RTCMediaConstraintsTest.mm",
592 "objc/Framework/UnitTests/RTCPeerConnectionTest.mm",
593 "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm",
jtteh7480da42017-07-07 11:02:15 -0700594 "objc/Framework/UnitTests/RTCTracingTest.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700595 "objc/Framework/UnitTests/avformatmappertests.mm",
kthelgasonfb143122017-07-25 07:55:58 -0700596 "objc/Framework/UnitTests/objc_video_decoder_factory_tests.mm",
597 "objc/Framework/UnitTests/objc_video_encoder_factory_tests.mm",
Kári Tristan Helgasonca957482017-10-05 14:06:52 +0200598 "objc/Framework/UnitTests/scoped_cftyperef_tests.mm",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700599 ]
oprypin45197522017-06-22 01:47:20 -0700600 if (is_ios &&
601 !(use_ios_simulator &&
602 # The tests crash on these simulator versions:
603 (ios_sdk_version == "10.0" || ios_sdk_version == "10.1"))) {
604 sources +=
605 [ "objc/Framework/UnitTests/RTCCameraVideoCapturerTests.mm" ]
606 }
mbonadeid7620582017-05-30 01:50:35 -0700607
mbonadei2c8ac1b2017-05-31 05:14:26 -0700608 # |-ObjC| flag needed to make sure category method implementations
609 # are included:
610 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
611 ldflags = [ "-ObjC" ]
magjed3149e092017-05-08 05:32:05 -0700612
mbonadei2c8ac1b2017-05-31 05:14:26 -0700613 defines = [ "GTEST_RELATIVE_PATH" ]
614 deps = [
Kári Tristan Helgasonca957482017-10-05 14:06:52 +0200615 ":common_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700616 ":peerconnection_objc",
617 ":peerconnectionfactory_objc",
618 ":videotoolbox_objc",
619 ":videotracksource_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700620 "..//system_wrappers:system_wrappers_default",
kthelgasonebd4f792017-09-04 04:36:21 -0700621 "../media:rtc_media_base",
kthelgasonfb143122017-07-25 07:55:58 -0700622 "../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700623 "../rtc_base:rtc_base_tests_utils",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700624 "../system_wrappers:system_wrappers_default",
Kári Tristan Helgasonca957482017-10-05 14:06:52 +0200625 "//test:test_support",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700626 "//third_party/ocmock",
627 ]
magjed3149e092017-05-08 05:32:05 -0700628
denicija59ee91b2017-06-05 05:48:47 -0700629 if (is_ios) {
630 sources += [ "objc/Framework/UnitTests/RTCAudioSessionTest.mm" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700631 }
Danielaae012cf2017-10-12 13:46:00 +0200632
mbonadei2c8ac1b2017-05-31 05:14:26 -0700633 if (!build_with_chromium && is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -0700634 # Suppress warnings from the Chromium Clang plugin
635 # (bugs.webrtc.org/163).
mbonadei2c8ac1b2017-05-31 05:14:26 -0700636 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
637 }
638 }
kthelgason2f088792017-05-30 01:48:47 -0700639 }
640
mbonadei2c8ac1b2017-05-31 05:14:26 -0700641 if (is_ios) {
kthelgason36d658d2017-08-24 05:43:45 -0700642 ios_framework_bundle("framework_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700643 info_plist = "objc/Framework/Info.plist"
644 output_name = "WebRTC"
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +0000645
mbonadei2c8ac1b2017-05-31 05:14:26 -0700646 common_objc_headers = [
Jeremy Newton-Smith96de4282017-08-23 10:02:23 -0700647 "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +0000648 "objc/Framework/Headers/WebRTC/RTCVideoCodec.h",
649 "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
Jeremy Newton-Smith96de4282017-08-23 10:02:23 -0700650 "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
Magnus Jedvertf83dc8b2017-08-29 09:49:43 +0000651 "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700652 "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
653 "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
654 "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
655 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
656 "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
657 "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
658 "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
659 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
660 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
661 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
662 "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
663 "objc/Framework/Headers/WebRTC/RTCIceServer.h",
Steve Antond295e402017-07-14 16:06:41 -0700664 "objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700665 "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
666 "objc/Framework/Headers/WebRTC/RTCLogging.h",
667 "objc/Framework/Headers/WebRTC/RTCMacros.h",
668 "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
669 "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
670 "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
671 "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
672 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
673 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
674 "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
675 "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
676 "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
677 "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
678 "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
679 "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
680 "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
681 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
682 "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
683 "objc/Framework/Headers/WebRTC/RTCTracing.h",
684 "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
Anders Carlsson7e042812017-10-05 16:55:38 +0200685 "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
686 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h",
687 "objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h",
688 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h",
689 "objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700690 "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200691 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700692 "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
693 "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
694 "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
695 "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
696 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
697 "objc/Framework/Headers/WebRTC/WebRTC.h",
698 ]
699 if (rtc_use_metal_rendering) {
700 common_objc_headers +=
701 [ "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h" ]
702 }
703 sources = common_objc_headers
704 public_headers = common_objc_headers
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +0100705
mbonadei2c8ac1b2017-05-31 05:14:26 -0700706 if (!build_with_chromium) {
707 sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ]
708 public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ]
709 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +0100710
mbonadei2c8ac1b2017-05-31 05:14:26 -0700711 ldflags = [
712 "-all_load",
713 "-install_name",
714 "@rpath/$output_name.framework/$output_name",
715 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +0100716
mbonadei2c8ac1b2017-05-31 05:14:26 -0700717 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700718 ":audio_objc",
719 ":peerconnection_objc",
720 ":ui_objc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700721 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700722 "../system_wrappers:field_trial_default",
723 "../system_wrappers:metrics_default",
724 ]
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +0100725
mbonadei2c8ac1b2017-05-31 05:14:26 -0700726 libs = [
727 "AVFoundation.framework",
728 "CoreGraphics.framework",
729 "CoreMedia.framework",
730 "GLKit.framework",
731 ]
732
733 configs += [ "..:common_objc" ]
734
kthelgason36d658d2017-08-24 05:43:45 -0700735 public_configs = [ ":common_config_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700736
737 if (!build_with_chromium && is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -0700738 # Suppress warnings from the Chromium Clang plugin
739 # (bugs.webrtc.org/163).
mbonadei2c8ac1b2017-05-31 05:14:26 -0700740 configs -= [ "//build/config/clang:find_bad_constructs" ]
741 }
742 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +0100743 }
744
mbonadei2c8ac1b2017-05-31 05:14:26 -0700745 rtc_static_library("rtc_sdk_objc") {
746 complete_static_lib = true
747 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700748 ":peerconnection_objc",
749 ":ui_objc",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700750 "../system_wrappers:field_trial_default",
751 "../system_wrappers:metrics_default",
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +0100752 ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700753 }
754
kthelgason36d658d2017-08-24 05:43:45 -0700755 rtc_static_library("corevideoframebuffer_objc") {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700756 sources = [
757 "objc/Framework/Classes/Video/corevideo_frame_buffer.cc",
758 "objc/Framework/Classes/Video/corevideo_frame_buffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700759 ]
760
761 deps = [
mbonadei2c8ac1b2017-05-31 05:14:26 -0700762 "../common_video",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700763 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700764 ]
765
766 if (!build_with_chromium && is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -0700767 # Suppress warnings from the Chromium Clang plugin
768 # (bugs.webrtc.org/163).
mbonadei2c8ac1b2017-05-31 05:14:26 -0700769 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
770 }
771
772 libs = [ "CoreVideo.framework" ]
773 }
774
mbonadeic0af5ac2017-08-24 12:26:05 -0700775 rtc_static_library("video_toolbox_cc") {
mbonadei6ff8f962017-09-04 05:51:34 -0700776 visibility = [ ":videotoolbox_objc" ]
mbonadei2c8ac1b2017-05-31 05:14:26 -0700777 sources = [
magjed73c0eb52017-08-07 06:55:28 -0700778 "objc/Framework/Classes/VideoToolbox/helpers.cc",
779 "objc/Framework/Classes/VideoToolbox/helpers.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700780 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.cc",
781 "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
mbonadeic0af5ac2017-08-24 12:26:05 -0700782 ]
783 deps = [
784 "../common_video",
785 "../modules:module_api",
786 "../modules/video_coding:webrtc_h264",
787 "../rtc_base:rtc_base_approved",
788 ]
789 if (!build_with_chromium && is_clang) {
790 # Suppress warnings from the Chromium Clang plugin
791 # (bugs.webrtc.org/163).
792 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
793 }
794 }
795
796 rtc_static_library("videotoolbox_objc") {
797 sources = [
798 "objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm",
799 "objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm",
kthelgasonfb143122017-07-25 07:55:58 -0700800 "objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.h",
801 "objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.mm",
802 "objc/Framework/Classes/VideoToolbox/objc_video_encoder_factory.h",
803 "objc/Framework/Classes/VideoToolbox/objc_video_encoder_factory.mm",
Anders Carlssone5960ce2017-06-22 15:26:30 +0200804 "objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700805 ]
806
807 configs += [ "..:common_objc" ]
808
809 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700810 ":common_objc",
811 ":video_objc",
mbonadeic0af5ac2017-08-24 12:26:05 -0700812 ":video_toolbox_cc",
kthelgason36d658d2017-08-24 05:43:45 -0700813 ":videotracksource_objc",
kthelgasonfb143122017-07-25 07:55:58 -0700814 "../api/video_codecs:video_codecs_api",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700815 "../common_video",
816 "../media:rtc_media",
817 "../media:rtc_media_base",
818 "../modules:module_api",
819 "../modules/video_coding:video_coding_utility",
820 "../modules/video_coding:webrtc_h264",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700821 "../rtc_base:rtc_base_approved",
mbonadei2c8ac1b2017-05-31 05:14:26 -0700822 "../system_wrappers",
823 ]
824
825 libs = [
826 "CoreFoundation.framework",
827 "CoreMedia.framework",
828 "CoreVideo.framework",
829 "VideoToolbox.framework",
830 ]
831
832 if (!build_with_chromium && is_clang) {
zhihuanga4c113a2017-06-28 14:05:44 -0700833 # Suppress warnings from the Chromium Clang plugin
834 # (bugs.webrtc.org/163).
mbonadei2c8ac1b2017-05-31 05:14:26 -0700835 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
836 }
837
838 if (rtc_build_libyuv) {
839 deps += [ "$rtc_libyuv_dir" ]
840 public_deps = [
841 "$rtc_libyuv_dir",
842 ]
843 } else {
844 # Need to add a directory normally exported by libyuv.
845 include_dirs = [ "$rtc_libyuv_dir/include" ]
846 }
Kári Tristan Helgasoncbe74352016-11-09 10:43:26 +0100847 }
848 }
tkchin9eeb6242016-04-27 01:54:20 -0700849}