tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 1 | # 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 | |
mbonadei | 9aa3f0a | 2017-01-24 06:58:22 -0800 | [diff] [blame] | 9 | import("../webrtc.gni") |
kthelgason | ebc34e7 | 2016-09-15 04:30:18 -0700 | [diff] [blame] | 10 | if (is_ios) { |
| 11 | import("//build/config/ios/rules.gni") |
| 12 | } |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 13 | |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 14 | group("sdk") { |
kthelgason | 5fe4d49 | 2016-12-05 11:27:30 -0800 | [diff] [blame] | 15 | if (is_ios) { |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 16 | public_deps = [ |
| 17 | ":rtc_sdk_framework_objc", |
| 18 | ] |
| 19 | } |
| 20 | } |
| 21 | |
kthelgason | cc2d1c6 | 2016-11-09 07:44:27 -0800 | [diff] [blame] | 22 | if (is_ios || is_mac) { |
kjellander | 080a1e3 | 2016-05-25 11:37:11 -0700 | [diff] [blame] | 23 | config("rtc_sdk_common_objc_config") { |
| 24 | include_dirs = [ |
| 25 | "objc/Framework/Classes", |
| 26 | "objc/Framework/Headers", |
| 27 | ] |
| 28 | } |
| 29 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 30 | rtc_static_library("rtc_sdk_common_objc") { |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 31 | sources = [ |
| 32 | "objc/Framework/Classes/NSString+StdString.h", |
| 33 | "objc/Framework/Classes/NSString+StdString.mm", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 34 | "objc/Framework/Classes/RTCDispatcher.m", |
| 35 | "objc/Framework/Classes/RTCFieldTrials.mm", |
| 36 | "objc/Framework/Classes/RTCLogging.mm", |
asapersson | 0ab07d6 | 2016-06-08 04:59:16 -0700 | [diff] [blame] | 37 | "objc/Framework/Classes/RTCMetrics.mm", |
| 38 | "objc/Framework/Classes/RTCMetricsSampleInfo+Private.h", |
| 39 | "objc/Framework/Classes/RTCMetricsSampleInfo.mm", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 40 | "objc/Framework/Classes/RTCSSLAdapter.mm", |
| 41 | "objc/Framework/Classes/RTCTracing.mm", |
kthelgason | 1f16ee3 | 2017-02-14 03:07:57 -0800 | [diff] [blame] | 42 | "objc/Framework/Classes/helpers.h", |
| 43 | "objc/Framework/Classes/helpers.mm", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 44 | "objc/Framework/Headers/WebRTC/RTCDispatcher.h", |
| 45 | "objc/Framework/Headers/WebRTC/RTCFieldTrials.h", |
| 46 | "objc/Framework/Headers/WebRTC/RTCLogging.h", |
| 47 | "objc/Framework/Headers/WebRTC/RTCMacros.h", |
asapersson | 0ab07d6 | 2016-06-08 04:59:16 -0700 | [diff] [blame] | 48 | "objc/Framework/Headers/WebRTC/RTCMetrics.h", |
| 49 | "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 50 | "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", |
| 51 | "objc/Framework/Headers/WebRTC/RTCTracing.h", |
| 52 | ] |
mbonadei | 1e060c6 | 2017-04-21 00:02:02 -0700 | [diff] [blame] | 53 | deps = [ |
| 54 | "../base:rtc_base", |
| 55 | ] |
kthelgason | c097710 | 2017-04-24 00:57:16 -0700 | [diff] [blame^] | 56 | configs += [ "..:common_objc" ] |
| 57 | |
| 58 | public_configs = [ ":rtc_sdk_common_objc_config" ] |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 59 | if (is_ios) { |
| 60 | sources += [ |
| 61 | "objc/Framework/Classes/RTCCameraPreviewView.m", |
| 62 | "objc/Framework/Classes/RTCUIApplication.h", |
| 63 | "objc/Framework/Classes/RTCUIApplication.mm", |
tkchin | d762910 | 2016-07-28 14:52:55 -0700 | [diff] [blame] | 64 | "objc/Framework/Classes/UIDevice+RTCDevice.mm", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 65 | "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h", |
tkchin | d762910 | 2016-07-28 14:52:55 -0700 | [diff] [blame] | 66 | "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 67 | ] |
denicija | 070d5e3 | 2017-02-26 11:44:13 -0800 | [diff] [blame] | 68 | if (current_cpu == "arm64") { |
| 69 | sources += [ |
| 70 | "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.h", |
| 71 | "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.mm", |
| 72 | "objc/Framework/Classes/Metal/RTCMTLVideoView.m", |
| 73 | ] |
mbonadei | 1e060c6 | 2017-04-21 00:02:02 -0700 | [diff] [blame] | 74 | deps += [ "../api:video_frame_api" ] |
denicija | 070d5e3 | 2017-02-26 11:44:13 -0800 | [diff] [blame] | 75 | } |
| 76 | |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 77 | libs = [ "AVFoundation.framework" ] |
denicija | 070d5e3 | 2017-02-26 11:44:13 -0800 | [diff] [blame] | 78 | if (current_cpu == "arm64") { |
| 79 | libs += [ |
| 80 | "CoreVideo.framework", |
| 81 | "Metal.framework", |
| 82 | "MetalKit.framework", |
| 83 | ] |
| 84 | } |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 85 | } |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 86 | if (!build_with_chromium) { |
| 87 | sources += [ |
| 88 | "objc/Framework/Classes/RTCFileLogger.mm", |
| 89 | "objc/Framework/Headers/WebRTC/RTCFileLogger.h", |
| 90 | ] |
| 91 | } |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 92 | } |
| 93 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 94 | rtc_static_library("rtc_sdk_peerconnection_objc") { |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 95 | sources = [ |
kthelgason | 954d9b9 | 2017-03-09 03:36:58 -0800 | [diff] [blame] | 96 | "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.h", |
denicija | 71caaca | 2016-11-23 00:41:57 -0800 | [diff] [blame] | 97 | "objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h", |
| 98 | "objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm", |
adam.fedor | fc22e03 | 2016-06-08 17:24:37 -0700 | [diff] [blame] | 99 | "objc/Framework/Classes/RTCAVFoundationVideoSource+Private.h", |
| 100 | "objc/Framework/Classes/RTCAVFoundationVideoSource.mm", |
tkchin | d4bfbfc | 2016-08-30 11:56:05 -0700 | [diff] [blame] | 101 | "objc/Framework/Classes/RTCAudioSource+Private.h", |
| 102 | "objc/Framework/Classes/RTCAudioSource.mm", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 103 | "objc/Framework/Classes/RTCAudioTrack+Private.h", |
| 104 | "objc/Framework/Classes/RTCAudioTrack.mm", |
sakal | 3883ccb | 2017-03-31 05:12:12 -0700 | [diff] [blame] | 105 | "objc/Framework/Classes/RTCCameraVideoCapturer.m", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 106 | "objc/Framework/Classes/RTCConfiguration+Private.h", |
| 107 | "objc/Framework/Classes/RTCConfiguration.mm", |
| 108 | "objc/Framework/Classes/RTCDataChannel+Private.h", |
| 109 | "objc/Framework/Classes/RTCDataChannel.mm", |
| 110 | "objc/Framework/Classes/RTCDataChannelConfiguration+Private.h", |
| 111 | "objc/Framework/Classes/RTCDataChannelConfiguration.mm", |
tkchin | 04dbb34 | 2016-08-08 03:10:07 -0700 | [diff] [blame] | 112 | "objc/Framework/Classes/RTCI420Shader.mm", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 113 | "objc/Framework/Classes/RTCIceCandidate+Private.h", |
| 114 | "objc/Framework/Classes/RTCIceCandidate.mm", |
| 115 | "objc/Framework/Classes/RTCIceServer+Private.h", |
| 116 | "objc/Framework/Classes/RTCIceServer.mm", |
hbos | bd3dda6 | 2016-09-09 01:36:28 -0700 | [diff] [blame] | 117 | "objc/Framework/Classes/RTCLegacyStatsReport+Private.h", |
| 118 | "objc/Framework/Classes/RTCLegacyStatsReport.mm", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 119 | "objc/Framework/Classes/RTCMediaConstraints+Private.h", |
| 120 | "objc/Framework/Classes/RTCMediaConstraints.mm", |
tkchin | d4bfbfc | 2016-08-30 11:56:05 -0700 | [diff] [blame] | 121 | "objc/Framework/Classes/RTCMediaSource+Private.h", |
| 122 | "objc/Framework/Classes/RTCMediaSource.mm", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 123 | "objc/Framework/Classes/RTCMediaStream+Private.h", |
| 124 | "objc/Framework/Classes/RTCMediaStream.mm", |
| 125 | "objc/Framework/Classes/RTCMediaStreamTrack+Private.h", |
| 126 | "objc/Framework/Classes/RTCMediaStreamTrack.mm", |
tkchin | 04dbb34 | 2016-08-08 03:10:07 -0700 | [diff] [blame] | 127 | "objc/Framework/Classes/RTCOpenGLDefines.h", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 128 | "objc/Framework/Classes/RTCPeerConnection+DataChannel.mm", |
| 129 | "objc/Framework/Classes/RTCPeerConnection+Private.h", |
| 130 | "objc/Framework/Classes/RTCPeerConnection+Stats.mm", |
| 131 | "objc/Framework/Classes/RTCPeerConnection.mm", |
| 132 | "objc/Framework/Classes/RTCPeerConnectionFactory+Private.h", |
| 133 | "objc/Framework/Classes/RTCPeerConnectionFactory.mm", |
| 134 | "objc/Framework/Classes/RTCRtpCodecParameters+Private.h", |
| 135 | "objc/Framework/Classes/RTCRtpCodecParameters.mm", |
| 136 | "objc/Framework/Classes/RTCRtpEncodingParameters+Private.h", |
| 137 | "objc/Framework/Classes/RTCRtpEncodingParameters.mm", |
| 138 | "objc/Framework/Classes/RTCRtpParameters+Private.h", |
| 139 | "objc/Framework/Classes/RTCRtpParameters.mm", |
| 140 | "objc/Framework/Classes/RTCRtpReceiver+Private.h", |
| 141 | "objc/Framework/Classes/RTCRtpReceiver.mm", |
| 142 | "objc/Framework/Classes/RTCRtpSender+Private.h", |
| 143 | "objc/Framework/Classes/RTCRtpSender.mm", |
| 144 | "objc/Framework/Classes/RTCSessionDescription+Private.h", |
| 145 | "objc/Framework/Classes/RTCSessionDescription.mm", |
tkchin | 04dbb34 | 2016-08-08 03:10:07 -0700 | [diff] [blame] | 146 | "objc/Framework/Classes/RTCShader+Private.h", |
| 147 | "objc/Framework/Classes/RTCShader.h", |
| 148 | "objc/Framework/Classes/RTCShader.mm", |
magjed | abb84b8 | 2017-03-28 01:56:41 -0700 | [diff] [blame] | 149 | "objc/Framework/Classes/RTCVideoCapturer.m", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 150 | "objc/Framework/Classes/RTCVideoFrame+Private.h", |
| 151 | "objc/Framework/Classes/RTCVideoFrame.mm", |
| 152 | "objc/Framework/Classes/RTCVideoRendererAdapter+Private.h", |
| 153 | "objc/Framework/Classes/RTCVideoRendererAdapter.h", |
| 154 | "objc/Framework/Classes/RTCVideoRendererAdapter.mm", |
| 155 | "objc/Framework/Classes/RTCVideoSource+Private.h", |
| 156 | "objc/Framework/Classes/RTCVideoSource.mm", |
| 157 | "objc/Framework/Classes/RTCVideoTrack+Private.h", |
| 158 | "objc/Framework/Classes/RTCVideoTrack.mm", |
denicija | 71caaca | 2016-11-23 00:41:57 -0800 | [diff] [blame] | 159 | "objc/Framework/Classes/avfoundationformatmapper.h", |
| 160 | "objc/Framework/Classes/avfoundationformatmapper.mm", |
adam.fedor | fc22e03 | 2016-06-08 17:24:37 -0700 | [diff] [blame] | 161 | "objc/Framework/Classes/avfoundationvideocapturer.h", |
| 162 | "objc/Framework/Classes/avfoundationvideocapturer.mm", |
magjed | abb84b8 | 2017-03-28 01:56:41 -0700 | [diff] [blame] | 163 | "objc/Framework/Classes/objcvideotracksource.h", |
| 164 | "objc/Framework/Classes/objcvideotracksource.mm", |
Kári Tristan Helgason | cbe7435 | 2016-11-09 10:43:26 +0100 | [diff] [blame] | 165 | "objc/Framework/Classes/videotoolboxvideocodecfactory.cc", |
| 166 | "objc/Framework/Classes/videotoolboxvideocodecfactory.h", |
adam.fedor | fc22e03 | 2016-06-08 17:24:37 -0700 | [diff] [blame] | 167 | "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h", |
tkchin | d4bfbfc | 2016-08-30 11:56:05 -0700 | [diff] [blame] | 168 | "objc/Framework/Headers/WebRTC/RTCAudioSource.h", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 169 | "objc/Framework/Headers/WebRTC/RTCAudioTrack.h", |
sakal | 3883ccb | 2017-03-31 05:12:12 -0700 | [diff] [blame] | 170 | "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 171 | "objc/Framework/Headers/WebRTC/RTCConfiguration.h", |
| 172 | "objc/Framework/Headers/WebRTC/RTCDataChannel.h", |
| 173 | "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h", |
| 174 | "objc/Framework/Headers/WebRTC/RTCIceCandidate.h", |
| 175 | "objc/Framework/Headers/WebRTC/RTCIceServer.h", |
hbos | bd3dda6 | 2016-09-09 01:36:28 -0700 | [diff] [blame] | 176 | "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 177 | "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h", |
tkchin | d4bfbfc | 2016-08-30 11:56:05 -0700 | [diff] [blame] | 178 | "objc/Framework/Headers/WebRTC/RTCMediaSource.h", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 179 | "objc/Framework/Headers/WebRTC/RTCMediaStream.h", |
| 180 | "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h", |
| 181 | "objc/Framework/Headers/WebRTC/RTCPeerConnection.h", |
| 182 | "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h", |
| 183 | "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h", |
| 184 | "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h", |
| 185 | "objc/Framework/Headers/WebRTC/RTCRtpParameters.h", |
| 186 | "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h", |
| 187 | "objc/Framework/Headers/WebRTC/RTCRtpSender.h", |
| 188 | "objc/Framework/Headers/WebRTC/RTCSessionDescription.h", |
magjed | abb84b8 | 2017-03-28 01:56:41 -0700 | [diff] [blame] | 189 | "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 190 | "objc/Framework/Headers/WebRTC/RTCVideoFrame.h", |
| 191 | "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h", |
| 192 | "objc/Framework/Headers/WebRTC/RTCVideoSource.h", |
| 193 | "objc/Framework/Headers/WebRTC/RTCVideoTrack.h", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 194 | ] |
| 195 | |
kthelgason | a974d76 | 2016-12-01 00:16:48 -0800 | [diff] [blame] | 196 | deps = [ |
| 197 | ":webrtc_h264_video_toolbox", |
mbonadei | 1e060c6 | 2017-04-21 00:02:02 -0700 | [diff] [blame] | 198 | "../api:video_frame_api", |
| 199 | "../base:rtc_base", |
| 200 | "../base:rtc_base_approved", |
| 201 | "../common_video", |
| 202 | "../media:rtc_media", |
| 203 | "../media:rtc_media_base", |
| 204 | "../system_wrappers", |
kthelgason | a974d76 | 2016-12-01 00:16:48 -0800 | [diff] [blame] | 205 | ] |
| 206 | |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 207 | if (is_ios) { |
| 208 | sources += [ |
| 209 | "objc/Framework/Classes/RTCEAGLVideoView.m", |
tkchin | 04dbb34 | 2016-08-08 03:10:07 -0700 | [diff] [blame] | 210 | "objc/Framework/Classes/RTCNativeNV12Shader.mm", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 211 | "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h", |
| 212 | ] |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 213 | libs = [ |
| 214 | "CoreGraphics.framework", |
| 215 | "GLKit.framework", |
| 216 | "OpenGLES.framework", |
| 217 | "QuartzCore.framework", |
| 218 | ] |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 219 | } |
| 220 | |
| 221 | if (is_mac) { |
| 222 | sources += [ |
denicija | 124a6fc | 2017-03-31 02:47:29 -0700 | [diff] [blame] | 223 | "objc/Framework/Classes/Metal/RTCMTLI420Renderer.h", |
| 224 | "objc/Framework/Classes/Metal/RTCMTLI420Renderer.mm", |
| 225 | "objc/Framework/Classes/Metal/RTCMTLNSVideoView.m", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 226 | "objc/Framework/Classes/RTCNSGLVideoView.m", |
denicija | 124a6fc | 2017-03-31 02:47:29 -0700 | [diff] [blame] | 227 | "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 228 | "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h", |
| 229 | ] |
adam.fedor | fc22e03 | 2016-06-08 17:24:37 -0700 | [diff] [blame] | 230 | libs = [ |
denicija | 124a6fc | 2017-03-31 02:47:29 -0700 | [diff] [blame] | 231 | "CoreVideo.framework", |
adam.fedor | fc22e03 | 2016-06-08 17:24:37 -0700 | [diff] [blame] | 232 | "CoreMedia.framework", |
| 233 | "OpenGL.framework", |
denicija | 124a6fc | 2017-03-31 02:47:29 -0700 | [diff] [blame] | 234 | "Metal.framework", |
| 235 | "MetalKit.framework", |
adam.fedor | fc22e03 | 2016-06-08 17:24:37 -0700 | [diff] [blame] | 236 | ] |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 237 | } |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 238 | |
kthelgason | c097710 | 2017-04-24 00:57:16 -0700 | [diff] [blame^] | 239 | configs += [ "..:common_objc" ] |
| 240 | |
| 241 | public_configs = [ ":rtc_sdk_common_objc_config" ] |
| 242 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 243 | if (!build_with_chromium && is_clang) { |
| 244 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 245 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 246 | } |
| 247 | |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 248 | libs += [ "AVFoundation.framework" ] |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 249 | |
Kári Tristan Helgason | cbe7435 | 2016-11-09 10:43:26 +0100 | [diff] [blame] | 250 | deps += [ |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 251 | ":rtc_sdk_common_objc", |
ossu | 7bb87ee | 2017-01-23 04:56:25 -0800 | [diff] [blame] | 252 | "../pc:libjingle_peerconnection", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 253 | ] |
magjed | 2ab012c | 2016-08-25 03:25:04 -0700 | [diff] [blame] | 254 | |
| 255 | if (rtc_build_libyuv) { |
| 256 | deps += [ "$rtc_libyuv_dir" ] |
| 257 | public_deps = [ |
| 258 | "$rtc_libyuv_dir", |
| 259 | ] |
| 260 | } |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 261 | } |
kthelgason | 725e212 | 2016-10-20 01:31:42 -0700 | [diff] [blame] | 262 | |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 263 | if (rtc_include_tests) { |
| 264 | rtc_source_set("rtc_sdk_peerconnection_objc_unittests") { |
| 265 | testonly = true |
| 266 | sources = [ |
| 267 | "objc/Framework/UnitTests/RTCConfigurationTest.mm", |
| 268 | "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm", |
| 269 | "objc/Framework/UnitTests/RTCIceCandidateTest.mm", |
| 270 | "objc/Framework/UnitTests/RTCIceServerTest.mm", |
| 271 | "objc/Framework/UnitTests/RTCMediaConstraintsTest.mm", |
jtteh | 4eeb537 | 2017-04-03 15:06:37 -0700 | [diff] [blame] | 272 | "objc/Framework/UnitTests/RTCPeerConnectionTest.mm", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 273 | "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm", |
| 274 | "objc/Framework/UnitTests/avformatmappertests.mm", |
| 275 | ] |
kthelgason | 954d9b9 | 2017-03-09 03:36:58 -0800 | [diff] [blame] | 276 | if (is_ios) { |
| 277 | sources += [ "objc/Framework/UnitTests/RTCMTLVideoViewTests.mm" ] |
| 278 | if (current_cpu != "arm64") { |
| 279 | sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ] |
| 280 | } |
| 281 | } |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 282 | |
| 283 | # TODO(tkchin): Cleanup this warning. |
| 284 | cflags = [ "-Wno-objc-property-no-attribute" ] |
| 285 | |
| 286 | # |-ObjC| flag needed to make sure category method implementations |
| 287 | # are included: |
| 288 | # https://developer.apple.com/library/mac/qa/qa1490/_index.html |
| 289 | ldflags = [ "-ObjC" ] |
| 290 | |
| 291 | defines = [ "GTEST_RELATIVE_PATH" ] |
mbonadei | 1e060c6 | 2017-04-21 00:02:02 -0700 | [diff] [blame] | 292 | deps = [ |
| 293 | ":rtc_sdk_peerconnection_objc", |
| 294 | "../base:rtc_base_tests_utils", |
| 295 | "//third_party/ocmock", |
| 296 | "//webrtc/system_wrappers:system_wrappers_default", |
| 297 | ] |
| 298 | |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 299 | if (!build_with_chromium && is_clang) { |
| 300 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 301 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 302 | } |
| 303 | } |
| 304 | } |
| 305 | |
kthelgason | ebc34e7 | 2016-09-15 04:30:18 -0700 | [diff] [blame] | 306 | if (is_ios) { |
| 307 | ios_framework_bundle("rtc_sdk_framework_objc") { |
| 308 | info_plist = "objc/Framework/Info.plist" |
| 309 | output_name = "WebRTC" |
| 310 | |
kthelgason | 5fe4d49 | 2016-12-05 11:27:30 -0800 | [diff] [blame] | 311 | common_objc_headers = [ |
| 312 | "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h", |
| 313 | "objc/Framework/Headers/WebRTC/RTCAudioSource.h", |
| 314 | "objc/Framework/Headers/WebRTC/RTCAudioTrack.h", |
| 315 | "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h", |
| 316 | "objc/Framework/Headers/WebRTC/RTCConfiguration.h", |
| 317 | "objc/Framework/Headers/WebRTC/RTCDataChannel.h", |
| 318 | "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h", |
| 319 | "objc/Framework/Headers/WebRTC/RTCDispatcher.h", |
| 320 | "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h", |
| 321 | "objc/Framework/Headers/WebRTC/RTCFieldTrials.h", |
| 322 | "objc/Framework/Headers/WebRTC/RTCIceCandidate.h", |
| 323 | "objc/Framework/Headers/WebRTC/RTCIceServer.h", |
| 324 | "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h", |
| 325 | "objc/Framework/Headers/WebRTC/RTCLogging.h", |
| 326 | "objc/Framework/Headers/WebRTC/RTCMacros.h", |
| 327 | "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h", |
| 328 | "objc/Framework/Headers/WebRTC/RTCMediaSource.h", |
| 329 | "objc/Framework/Headers/WebRTC/RTCMediaStream.h", |
| 330 | "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h", |
| 331 | "objc/Framework/Headers/WebRTC/RTCMetrics.h", |
| 332 | "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h", |
denicija | 070d5e3 | 2017-02-26 11:44:13 -0800 | [diff] [blame] | 333 | "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h", |
kthelgason | 5fe4d49 | 2016-12-05 11:27:30 -0800 | [diff] [blame] | 334 | "objc/Framework/Headers/WebRTC/RTCPeerConnection.h", |
| 335 | "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h", |
| 336 | "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h", |
| 337 | "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h", |
| 338 | "objc/Framework/Headers/WebRTC/RTCRtpParameters.h", |
| 339 | "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h", |
| 340 | "objc/Framework/Headers/WebRTC/RTCRtpSender.h", |
| 341 | "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", |
| 342 | "objc/Framework/Headers/WebRTC/RTCSessionDescription.h", |
| 343 | "objc/Framework/Headers/WebRTC/RTCTracing.h", |
| 344 | "objc/Framework/Headers/WebRTC/RTCVideoFrame.h", |
| 345 | "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h", |
| 346 | "objc/Framework/Headers/WebRTC/RTCVideoSource.h", |
| 347 | "objc/Framework/Headers/WebRTC/RTCVideoTrack.h", |
| 348 | "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", |
| 349 | "objc/Framework/Headers/WebRTC/WebRTC.h", |
| 350 | ] |
| 351 | |
kthelgason | ebc34e7 | 2016-09-15 04:30:18 -0700 | [diff] [blame] | 352 | sources = common_objc_headers |
| 353 | public_headers = common_objc_headers |
| 354 | |
| 355 | if (!build_with_chromium) { |
| 356 | sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] |
| 357 | public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ] |
| 358 | } |
| 359 | |
kthelgason | d3adbfb | 2017-01-26 01:14:04 -0800 | [diff] [blame] | 360 | ldflags = [ |
| 361 | "-all_load", |
| 362 | "-install_name", |
| 363 | "@rpath/$output_name.framework/$output_name", |
| 364 | ] |
Zeke Chin | dd0e1e0 | 2016-10-11 13:27:26 -0700 | [diff] [blame] | 365 | |
kthelgason | ebc34e7 | 2016-09-15 04:30:18 -0700 | [diff] [blame] | 366 | deps = [ |
| 367 | ":rtc_sdk_peerconnection_objc", |
nicholss | c6ca544 | 2016-10-11 16:12:44 -0700 | [diff] [blame] | 368 | "../system_wrappers:field_trial_default", |
| 369 | "../system_wrappers:metrics_default", |
kthelgason | ebc34e7 | 2016-09-15 04:30:18 -0700 | [diff] [blame] | 370 | ] |
| 371 | |
| 372 | libs = [ |
| 373 | "AVFoundation.framework", |
| 374 | "AudioToolbox.framework", |
| 375 | "CoreGraphics.framework", |
| 376 | "CoreMedia.framework", |
| 377 | "GLKit.framework", |
| 378 | "VideoToolbox.framework", |
| 379 | ] |
| 380 | |
kthelgason | c097710 | 2017-04-24 00:57:16 -0700 | [diff] [blame^] | 381 | configs += [ "..:common_objc" ] |
| 382 | |
| 383 | public_configs = [ ":rtc_sdk_common_objc_config" ] |
| 384 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 385 | if (!build_with_chromium && is_clang) { |
| 386 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) |
kthelgason | ebc34e7 | 2016-09-15 04:30:18 -0700 | [diff] [blame] | 387 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 388 | } |
| 389 | } |
| 390 | } |
Zeke Chin | dd0e1e0 | 2016-10-11 13:27:26 -0700 | [diff] [blame] | 391 | |
| 392 | rtc_static_library("rtc_sdk_objc") { |
| 393 | complete_static_lib = true |
| 394 | deps = [ |
| 395 | ":rtc_sdk_peerconnection_objc", |
Kári Tristan Helgason | cbe7435 | 2016-11-09 10:43:26 +0100 | [diff] [blame] | 396 | "//webrtc/system_wrappers:field_trial_default", |
| 397 | "//webrtc/system_wrappers:metrics_default", |
Zeke Chin | dd0e1e0 | 2016-10-11 13:27:26 -0700 | [diff] [blame] | 398 | ] |
| 399 | } |
Kári Tristan Helgason | cbe7435 | 2016-11-09 10:43:26 +0100 | [diff] [blame] | 400 | |
| 401 | rtc_static_library("webrtc_h264_video_toolbox") { |
| 402 | sources = [ |
| 403 | "objc/Framework/Classes/h264_video_toolbox_decoder.cc", |
| 404 | "objc/Framework/Classes/h264_video_toolbox_decoder.h", |
| 405 | "objc/Framework/Classes/h264_video_toolbox_encoder.h", |
| 406 | "objc/Framework/Classes/h264_video_toolbox_encoder.mm", |
| 407 | "objc/Framework/Classes/h264_video_toolbox_nalu.cc", |
| 408 | "objc/Framework/Classes/h264_video_toolbox_nalu.h", |
| 409 | ] |
| 410 | |
kthelgason | c097710 | 2017-04-24 00:57:16 -0700 | [diff] [blame^] | 411 | configs += [ "//webrtc:common_objc" ] |
Kári Tristan Helgason | cbe7435 | 2016-11-09 10:43:26 +0100 | [diff] [blame] | 412 | |
| 413 | deps = [ |
| 414 | ":rtc_sdk_common_objc", |
mbonadei | 1e060c6 | 2017-04-21 00:02:02 -0700 | [diff] [blame] | 415 | "../api:video_frame_api", |
| 416 | "../base:rtc_base_approved", |
| 417 | "../common_video", |
| 418 | "../media:rtc_media_base", |
| 419 | "../modules/video_coding:video_coding_utility", |
| 420 | "../modules/video_coding:webrtc_h264", |
| 421 | "../system_wrappers", |
Kári Tristan Helgason | cbe7435 | 2016-11-09 10:43:26 +0100 | [diff] [blame] | 422 | ] |
| 423 | |
| 424 | libs = [ |
| 425 | "CoreFoundation.framework", |
| 426 | "CoreMedia.framework", |
| 427 | "CoreVideo.framework", |
| 428 | "VideoToolbox.framework", |
| 429 | ] |
| 430 | |
| 431 | if (!build_with_chromium && is_clang) { |
| 432 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 433 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 434 | } |
| 435 | |
| 436 | if (rtc_build_libyuv) { |
| 437 | deps += [ "$rtc_libyuv_dir" ] |
| 438 | public_deps = [ |
| 439 | "$rtc_libyuv_dir", |
| 440 | ] |
| 441 | } else { |
| 442 | # Need to add a directory normally exported by libyuv. |
| 443 | include_dirs = [ "$rtc_libyuv_dir/include" ] |
| 444 | } |
| 445 | } |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 446 | } |