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 | |
| 9 | import("../build/webrtc.gni") |
| 10 | import("//build_overrides/webrtc.gni") |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 11 | import("//build/config/mac/mac_sdk.gni") |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 12 | |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 13 | if (is_ios || (is_mac && mac_deployment_target == "10.7")) { |
kjellander | 080a1e3 | 2016-05-25 11:37:11 -0700 | [diff] [blame] | 14 | config("rtc_sdk_common_objc_config") { |
| 15 | include_dirs = [ |
| 16 | "objc/Framework/Classes", |
| 17 | "objc/Framework/Headers", |
| 18 | ] |
| 19 | } |
| 20 | |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 21 | source_set("rtc_sdk_common_objc") { |
| 22 | deps = [ |
| 23 | "../base:rtc_base", |
| 24 | ] |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 25 | configs += [ |
| 26 | "..:common_config", |
| 27 | "//build/config/compiler:enable_arc", |
| 28 | ] |
kjellander | 080a1e3 | 2016-05-25 11:37:11 -0700 | [diff] [blame] | 29 | public_configs = [ |
| 30 | "..:common_inherited_config", |
| 31 | ":rtc_sdk_common_objc_config", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 32 | ] |
| 33 | sources = [ |
| 34 | "objc/Framework/Classes/NSString+StdString.h", |
| 35 | "objc/Framework/Classes/NSString+StdString.mm", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 36 | "objc/Framework/Classes/RTCDispatcher.m", |
| 37 | "objc/Framework/Classes/RTCFieldTrials.mm", |
| 38 | "objc/Framework/Classes/RTCLogging.mm", |
asapersson | 0ab07d6 | 2016-06-08 04:59:16 -0700 | [diff] [blame] | 39 | "objc/Framework/Classes/RTCMetrics.mm", |
| 40 | "objc/Framework/Classes/RTCMetricsSampleInfo+Private.h", |
| 41 | "objc/Framework/Classes/RTCMetricsSampleInfo.mm", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 42 | "objc/Framework/Classes/RTCSSLAdapter.mm", |
| 43 | "objc/Framework/Classes/RTCTracing.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 | ] |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 53 | if (is_ios) { |
| 54 | sources += [ |
| 55 | "objc/Framework/Classes/RTCCameraPreviewView.m", |
| 56 | "objc/Framework/Classes/RTCUIApplication.h", |
| 57 | "objc/Framework/Classes/RTCUIApplication.mm", |
tkchin | d762910 | 2016-07-28 14:52:55 -0700 | [diff] [blame] | 58 | "objc/Framework/Classes/UIDevice+RTCDevice.mm", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 59 | "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h", |
tkchin | d762910 | 2016-07-28 14:52:55 -0700 | [diff] [blame] | 60 | "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 61 | ] |
| 62 | libs = [ "AVFoundation.framework" ] |
| 63 | } |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 64 | if (!build_with_chromium) { |
| 65 | sources += [ |
| 66 | "objc/Framework/Classes/RTCFileLogger.mm", |
| 67 | "objc/Framework/Headers/WebRTC/RTCFileLogger.h", |
| 68 | ] |
| 69 | } |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | source_set("rtc_sdk_peerconnection_objc") { |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 73 | sources = [ |
adam.fedor | fc22e03 | 2016-06-08 17:24:37 -0700 | [diff] [blame] | 74 | "objc/Framework/Classes/RTCAVFoundationVideoSource+Private.h", |
| 75 | "objc/Framework/Classes/RTCAVFoundationVideoSource.mm", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 76 | "objc/Framework/Classes/RTCAudioTrack+Private.h", |
| 77 | "objc/Framework/Classes/RTCAudioTrack.mm", |
| 78 | "objc/Framework/Classes/RTCConfiguration+Private.h", |
| 79 | "objc/Framework/Classes/RTCConfiguration.mm", |
| 80 | "objc/Framework/Classes/RTCDataChannel+Private.h", |
| 81 | "objc/Framework/Classes/RTCDataChannel.mm", |
| 82 | "objc/Framework/Classes/RTCDataChannelConfiguration+Private.h", |
| 83 | "objc/Framework/Classes/RTCDataChannelConfiguration.mm", |
| 84 | "objc/Framework/Classes/RTCIceCandidate+Private.h", |
| 85 | "objc/Framework/Classes/RTCIceCandidate.mm", |
| 86 | "objc/Framework/Classes/RTCIceServer+Private.h", |
| 87 | "objc/Framework/Classes/RTCIceServer.mm", |
| 88 | "objc/Framework/Classes/RTCMediaConstraints+Private.h", |
| 89 | "objc/Framework/Classes/RTCMediaConstraints.mm", |
| 90 | "objc/Framework/Classes/RTCMediaStream+Private.h", |
| 91 | "objc/Framework/Classes/RTCMediaStream.mm", |
| 92 | "objc/Framework/Classes/RTCMediaStreamTrack+Private.h", |
| 93 | "objc/Framework/Classes/RTCMediaStreamTrack.mm", |
| 94 | "objc/Framework/Classes/RTCOpenGLVideoRenderer.h", |
| 95 | "objc/Framework/Classes/RTCOpenGLVideoRenderer.mm", |
| 96 | "objc/Framework/Classes/RTCPeerConnection+DataChannel.mm", |
| 97 | "objc/Framework/Classes/RTCPeerConnection+Private.h", |
| 98 | "objc/Framework/Classes/RTCPeerConnection+Stats.mm", |
| 99 | "objc/Framework/Classes/RTCPeerConnection.mm", |
| 100 | "objc/Framework/Classes/RTCPeerConnectionFactory+Private.h", |
| 101 | "objc/Framework/Classes/RTCPeerConnectionFactory.mm", |
| 102 | "objc/Framework/Classes/RTCRtpCodecParameters+Private.h", |
| 103 | "objc/Framework/Classes/RTCRtpCodecParameters.mm", |
| 104 | "objc/Framework/Classes/RTCRtpEncodingParameters+Private.h", |
| 105 | "objc/Framework/Classes/RTCRtpEncodingParameters.mm", |
| 106 | "objc/Framework/Classes/RTCRtpParameters+Private.h", |
| 107 | "objc/Framework/Classes/RTCRtpParameters.mm", |
| 108 | "objc/Framework/Classes/RTCRtpReceiver+Private.h", |
| 109 | "objc/Framework/Classes/RTCRtpReceiver.mm", |
| 110 | "objc/Framework/Classes/RTCRtpSender+Private.h", |
| 111 | "objc/Framework/Classes/RTCRtpSender.mm", |
| 112 | "objc/Framework/Classes/RTCSessionDescription+Private.h", |
| 113 | "objc/Framework/Classes/RTCSessionDescription.mm", |
| 114 | "objc/Framework/Classes/RTCStatsReport+Private.h", |
| 115 | "objc/Framework/Classes/RTCStatsReport.mm", |
| 116 | "objc/Framework/Classes/RTCVideoFrame+Private.h", |
| 117 | "objc/Framework/Classes/RTCVideoFrame.mm", |
| 118 | "objc/Framework/Classes/RTCVideoRendererAdapter+Private.h", |
| 119 | "objc/Framework/Classes/RTCVideoRendererAdapter.h", |
| 120 | "objc/Framework/Classes/RTCVideoRendererAdapter.mm", |
| 121 | "objc/Framework/Classes/RTCVideoSource+Private.h", |
| 122 | "objc/Framework/Classes/RTCVideoSource.mm", |
| 123 | "objc/Framework/Classes/RTCVideoTrack+Private.h", |
| 124 | "objc/Framework/Classes/RTCVideoTrack.mm", |
adam.fedor | fc22e03 | 2016-06-08 17:24:37 -0700 | [diff] [blame] | 125 | "objc/Framework/Classes/avfoundationvideocapturer.h", |
| 126 | "objc/Framework/Classes/avfoundationvideocapturer.mm", |
| 127 | "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h", |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 128 | "objc/Framework/Headers/WebRTC/RTCAudioTrack.h", |
| 129 | "objc/Framework/Headers/WebRTC/RTCConfiguration.h", |
| 130 | "objc/Framework/Headers/WebRTC/RTCDataChannel.h", |
| 131 | "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h", |
| 132 | "objc/Framework/Headers/WebRTC/RTCIceCandidate.h", |
| 133 | "objc/Framework/Headers/WebRTC/RTCIceServer.h", |
| 134 | "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h", |
| 135 | "objc/Framework/Headers/WebRTC/RTCMediaStream.h", |
| 136 | "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h", |
| 137 | "objc/Framework/Headers/WebRTC/RTCPeerConnection.h", |
| 138 | "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h", |
| 139 | "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h", |
| 140 | "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h", |
| 141 | "objc/Framework/Headers/WebRTC/RTCRtpParameters.h", |
| 142 | "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h", |
| 143 | "objc/Framework/Headers/WebRTC/RTCRtpSender.h", |
| 144 | "objc/Framework/Headers/WebRTC/RTCSessionDescription.h", |
| 145 | "objc/Framework/Headers/WebRTC/RTCStatsReport.h", |
| 146 | "objc/Framework/Headers/WebRTC/RTCVideoFrame.h", |
| 147 | "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h", |
| 148 | "objc/Framework/Headers/WebRTC/RTCVideoSource.h", |
| 149 | "objc/Framework/Headers/WebRTC/RTCVideoTrack.h", |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 150 | ] |
| 151 | |
| 152 | if (is_ios) { |
| 153 | sources += [ |
| 154 | "objc/Framework/Classes/RTCEAGLVideoView.m", |
| 155 | "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h", |
| 156 | ] |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 157 | libs = [ |
| 158 | "CoreGraphics.framework", |
| 159 | "GLKit.framework", |
| 160 | "OpenGLES.framework", |
| 161 | "QuartzCore.framework", |
| 162 | ] |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 163 | } |
| 164 | |
| 165 | if (is_mac) { |
| 166 | sources += [ |
| 167 | "objc/Framework/Classes/RTCNSGLVideoView.m", |
| 168 | "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h", |
| 169 | ] |
adam.fedor | fc22e03 | 2016-06-08 17:24:37 -0700 | [diff] [blame] | 170 | libs = [ |
| 171 | "CoreMedia.framework", |
| 172 | "OpenGL.framework", |
| 173 | ] |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 174 | } |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 175 | |
| 176 | configs += [ |
| 177 | "..:common_objc", |
| 178 | "//build/config/compiler:enable_arc", |
| 179 | ] |
| 180 | |
| 181 | public_configs = [ ":rtc_sdk_common_objc_config" ] |
| 182 | |
| 183 | if (is_clang) { |
| 184 | # Suppress warnings from the Chromium Clang plugins. |
| 185 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 186 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 187 | } |
| 188 | |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame^] | 189 | libs += [ "AVFoundation.framework" ] |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 190 | |
| 191 | deps = [ |
| 192 | ":rtc_sdk_common_objc", |
| 193 | "../api:libjingle_peerconnection", |
| 194 | ] |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 195 | } |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 196 | |
| 197 | # TODO(tkchin): Add the rtc_sdk_framework_objc target. |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 198 | } |