blob: 0904d4b4d28b388d28e440a6fa0de02cb4e5797c [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
9import("../build/webrtc.gni")
10import("//build_overrides/webrtc.gni")
kjellander3bcedd32016-06-08 01:14:15 -070011import("//build/config/mac/mac_sdk.gni")
tkchin9eeb6242016-04-27 01:54:20 -070012
kjellander3bcedd32016-06-08 01:14:15 -070013if (is_ios || (is_mac && mac_deployment_target == "10.7")) {
kjellander080a1e32016-05-25 11:37:11 -070014 config("rtc_sdk_common_objc_config") {
15 include_dirs = [
16 "objc/Framework/Classes",
17 "objc/Framework/Headers",
18 ]
19 }
20
tkchin9eeb6242016-04-27 01:54:20 -070021 source_set("rtc_sdk_common_objc") {
22 deps = [
23 "../base:rtc_base",
24 ]
kjellander3bcedd32016-06-08 01:14:15 -070025 configs += [
26 "..:common_config",
27 "//build/config/compiler:enable_arc",
28 ]
kjellander080a1e32016-05-25 11:37:11 -070029 public_configs = [
30 "..:common_inherited_config",
31 ":rtc_sdk_common_objc_config",
tkchin9eeb6242016-04-27 01:54:20 -070032 ]
33 sources = [
34 "objc/Framework/Classes/NSString+StdString.h",
35 "objc/Framework/Classes/NSString+StdString.mm",
tkchin9eeb6242016-04-27 01:54:20 -070036 "objc/Framework/Classes/RTCDispatcher.m",
37 "objc/Framework/Classes/RTCFieldTrials.mm",
38 "objc/Framework/Classes/RTCLogging.mm",
asapersson0ab07d62016-06-08 04:59:16 -070039 "objc/Framework/Classes/RTCMetrics.mm",
40 "objc/Framework/Classes/RTCMetricsSampleInfo+Private.h",
41 "objc/Framework/Classes/RTCMetricsSampleInfo.mm",
tkchin9eeb6242016-04-27 01:54:20 -070042 "objc/Framework/Classes/RTCSSLAdapter.mm",
43 "objc/Framework/Classes/RTCTracing.mm",
tkchin9eeb6242016-04-27 01:54:20 -070044 "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",
asapersson0ab07d62016-06-08 04:59:16 -070048 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
49 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
tkchin9eeb6242016-04-27 01:54:20 -070050 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
51 "objc/Framework/Headers/WebRTC/RTCTracing.h",
52 ]
kjellander3bcedd32016-06-08 01:14:15 -070053 if (is_ios) {
54 sources += [
55 "objc/Framework/Classes/RTCCameraPreviewView.m",
56 "objc/Framework/Classes/RTCUIApplication.h",
57 "objc/Framework/Classes/RTCUIApplication.mm",
tkchind7629102016-07-28 14:52:55 -070058 "objc/Framework/Classes/UIDevice+RTCDevice.mm",
kjellander3bcedd32016-06-08 01:14:15 -070059 "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
tkchind7629102016-07-28 14:52:55 -070060 "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
kjellander3bcedd32016-06-08 01:14:15 -070061 ]
62 libs = [ "AVFoundation.framework" ]
63 }
tkchin9eeb6242016-04-27 01:54:20 -070064 if (!build_with_chromium) {
65 sources += [
66 "objc/Framework/Classes/RTCFileLogger.mm",
67 "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
68 ]
69 }
tkchin9eeb6242016-04-27 01:54:20 -070070 }
71
72 source_set("rtc_sdk_peerconnection_objc") {
tkchin9eeb6242016-04-27 01:54:20 -070073 sources = [
adam.fedorfc22e032016-06-08 17:24:37 -070074 "objc/Framework/Classes/RTCAVFoundationVideoSource+Private.h",
75 "objc/Framework/Classes/RTCAVFoundationVideoSource.mm",
kjellander3bcedd32016-06-08 01:14:15 -070076 "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.fedorfc22e032016-06-08 17:24:37 -0700125 "objc/Framework/Classes/avfoundationvideocapturer.h",
126 "objc/Framework/Classes/avfoundationvideocapturer.mm",
127 "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h",
kjellander3bcedd32016-06-08 01:14:15 -0700128 "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",
tkchin9eeb6242016-04-27 01:54:20 -0700150 ]
151
152 if (is_ios) {
153 sources += [
154 "objc/Framework/Classes/RTCEAGLVideoView.m",
155 "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
156 ]
kjellander3bcedd32016-06-08 01:14:15 -0700157 libs = [
158 "CoreGraphics.framework",
159 "GLKit.framework",
160 "OpenGLES.framework",
161 "QuartzCore.framework",
162 ]
tkchin9eeb6242016-04-27 01:54:20 -0700163 }
164
165 if (is_mac) {
166 sources += [
167 "objc/Framework/Classes/RTCNSGLVideoView.m",
168 "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
169 ]
adam.fedorfc22e032016-06-08 17:24:37 -0700170 libs = [
171 "CoreMedia.framework",
172 "OpenGL.framework",
173 ]
tkchin9eeb6242016-04-27 01:54:20 -0700174 }
kjellander3bcedd32016-06-08 01:14:15 -0700175
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
tkchin2ddfdba2016-08-07 21:37:45 -0700189 libs += [ "AVFoundation.framework" ]
kjellander3bcedd32016-06-08 01:14:15 -0700190
191 deps = [
192 ":rtc_sdk_common_objc",
193 "../api:libjingle_peerconnection",
194 ]
tkchin9eeb6242016-04-27 01:54:20 -0700195 }
kjellander3bcedd32016-06-08 01:14:15 -0700196
197 # TODO(tkchin): Add the rtc_sdk_framework_objc target.
tkchin9eeb6242016-04-27 01:54:20 -0700198}