Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 1 | # Copyright (c) 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 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 9 | import("../build/webrtc.gni") |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 10 | if (is_android) { |
| 11 | import("//build/config/android/config.gni") |
| 12 | import("//build/config/android/rules.gni") |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 13 | } else if (is_mac) { |
| 14 | import("//build/config/mac/rules.gni") |
| 15 | } else if (is_ios) { |
| 16 | import("//build/config/ios/rules.gni") |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 17 | } |
| 18 | |
| 19 | group("examples") { |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 20 | # This target shall build all targets in examples. |
| 21 | testonly = true |
kjellander | 705ecc5 | 2016-09-15 00:53:26 -0700 | [diff] [blame] | 22 | public_deps = [] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 23 | |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 24 | if (is_android) { |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 25 | public_deps += [ |
| 26 | ":AppRTCMobile", |
| 27 | ":AppRTCMobileTest", |
| 28 | ] |
| 29 | } |
| 30 | |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 31 | if (!build_with_chromium) { |
| 32 | public_deps += [ ":stun_prober" ] |
| 33 | } |
| 34 | |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 35 | if (is_ios || (is_mac && target_cpu != "x86")) { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 36 | public_deps += [ ":AppRTCMobile" ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 37 | } |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 38 | |
| 39 | if (is_linux || is_win) { |
kjellander | 705ecc5 | 2016-09-15 00:53:26 -0700 | [diff] [blame] | 40 | public_deps += [ |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 41 | ":peerconnection_client", |
| 42 | ":peerconnection_server", |
| 43 | ":relayserver", |
| 44 | ":stunserver", |
| 45 | ":turnserver", |
| 46 | ] |
| 47 | } |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 48 | } |
| 49 | |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 50 | if (is_android) { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 51 | android_apk("AppRTCMobile") { |
| 52 | apk_name = "AppRTCMobile" |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 53 | android_manifest = "androidapp/AndroidManifest.xml" |
| 54 | |
| 55 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 56 | ":AppRTCMobile_javalib", |
| 57 | ":AppRTCMobile_resources", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 58 | "//base:base_java", |
| 59 | "//webrtc/base:base_java", |
| 60 | ] |
| 61 | |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 62 | shared_libraries = [ "//webrtc/sdk/android:libjingle_peerconnection_so" ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 63 | } |
| 64 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 65 | android_library("AppRTCMobile_javalib") { |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 66 | java_files = [ |
| 67 | "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java", |
henrika | c3c2f31 | 2016-12-14 07:36:56 -0800 | [diff] [blame] | 68 | "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 69 | "androidapp/src/org/appspot/apprtc/AppRTCClient.java", |
| 70 | "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java", |
| 71 | "androidapp/src/org/appspot/apprtc/CallActivity.java", |
| 72 | "androidapp/src/org/appspot/apprtc/CallFragment.java", |
| 73 | "androidapp/src/org/appspot/apprtc/CaptureQualityController.java", |
| 74 | "androidapp/src/org/appspot/apprtc/ConnectActivity.java", |
| 75 | "androidapp/src/org/appspot/apprtc/CpuMonitor.java", |
| 76 | "androidapp/src/org/appspot/apprtc/DirectRTCClient.java", |
| 77 | "androidapp/src/org/appspot/apprtc/HudFragment.java", |
| 78 | "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java", |
| 79 | "androidapp/src/org/appspot/apprtc/PercentFrameLayout.java", |
| 80 | "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java", |
| 81 | "androidapp/src/org/appspot/apprtc/SettingsActivity.java", |
| 82 | "androidapp/src/org/appspot/apprtc/SettingsFragment.java", |
| 83 | "androidapp/src/org/appspot/apprtc/TCPChannelClient.java", |
| 84 | "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java", |
| 85 | "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java", |
| 86 | "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java", |
| 87 | "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java", |
| 88 | "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 89 | ] |
| 90 | |
| 91 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 92 | ":AppRTCMobile_resources", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 93 | "//webrtc/base:base_java", |
| 94 | "//webrtc/examples/androidapp/third_party/autobanh:autobanh_java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 95 | "//webrtc/sdk/android:libjingle_peerconnection_java", |
| 96 | "//webrtc/sdk/android:libjingle_peerconnection_metrics_default_java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 97 | ] |
| 98 | } |
| 99 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 100 | android_resources("AppRTCMobile_resources") { |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 101 | resource_dirs = [ "androidapp/res" ] |
| 102 | custom_package = "org.appspot.apprtc" |
| 103 | } |
| 104 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 105 | instrumentation_test_apk("AppRTCMobileTest") { |
| 106 | apk_name = "AppRTCMobileTest" |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 107 | android_manifest = "androidtests/AndroidManifest.xml" |
| 108 | |
mandermo | a8bec8d | 2016-10-26 01:47:07 -0700 | [diff] [blame] | 109 | java_files = [ |
mandermo | 9890a58 | 2016-10-27 07:26:36 -0700 | [diff] [blame] | 110 | "androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java", |
mandermo | a8bec8d | 2016-10-26 01:47:07 -0700 | [diff] [blame] | 111 | "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java", |
| 112 | "androidtests/src/org/appspot/apprtc/test/VideoFileRendererTest.java", |
| 113 | ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 114 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 115 | apk_under_test = ":AppRTCMobile" |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 116 | |
| 117 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 118 | ":AppRTCMobile_javalib", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 119 | "//webrtc/sdk/android:libjingle_peerconnection_java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 120 | ] |
mandermo | 9890a58 | 2016-10-27 07:26:36 -0700 | [diff] [blame] | 121 | |
| 122 | data = [ |
| 123 | "//webrtc/examples/androidtests/src/org/appspot/apprtc/test/capturetestvideo.y4m", |
| 124 | ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 125 | } |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 126 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 127 | |
| 128 | if (is_ios || (is_mac && target_cpu != "x86")) { |
| 129 | config("warnings_config") { |
| 130 | # GN orders flags on a target before flags from configs. The default config |
| 131 | # adds these flags so to cancel them out they need to come from a config and |
| 132 | # cannot be on the target directly. |
| 133 | if (is_ios) { |
| 134 | # Suppress compiler warnings about deprecated that triggered |
| 135 | # when moving from ios_deployment_target 7.0 to 9.0. |
| 136 | # See webrtc:5549 for more details. |
| 137 | cflags = [ "-Wno-deprecated-declarations" ] |
Henrik Kjellander | 91a5759 | 2016-10-12 20:25:34 -0700 | [diff] [blame] | 138 | cflags_objc = [ |
| 139 | # Enabled for cflags_objc in build/config/compiler/BUILD.gn. |
| 140 | # See webrtc:6520. |
| 141 | "-Wno-objc-missing-property-synthesis", |
| 142 | ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 143 | } |
| 144 | } |
| 145 | |
| 146 | config("apprtc_common_config") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 147 | include_dirs = [ "objc/AppRTCMobile/common" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 148 | } |
| 149 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 150 | rtc_static_library("apprtc_common") { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 151 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 152 | "objc/AppRTCMobile/common/ARDUtilities.h", |
| 153 | "objc/AppRTCMobile/common/ARDUtilities.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 154 | ] |
| 155 | configs += [ |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 156 | ":warnings_config", |
| 157 | "//build/config/compiler:enable_arc", |
| 158 | ] |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 159 | public_configs = [ ":apprtc_common_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 160 | |
| 161 | deps = [ |
| 162 | "../sdk:rtc_sdk_common_objc", |
| 163 | "../system_wrappers:field_trial_default", |
| 164 | "../system_wrappers:metrics_default", |
| 165 | ] |
| 166 | } |
| 167 | |
| 168 | config("apprtc_signaling_config") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 169 | include_dirs = [ "objc/AppRTCMobile" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 170 | |
| 171 | # GN orders flags on a target before flags from configs. The default config |
| 172 | # adds these flags so to cancel them out they need to come from a config and |
| 173 | # cannot be on the target directly. |
| 174 | cflags = [ |
| 175 | "-Wno-sign-compare", |
| 176 | "-Wno-unused-variable", |
| 177 | ] |
| 178 | if (is_mac) { |
| 179 | cflags += [ "-Wno-partial-availability" ] |
| 180 | } |
| 181 | } |
| 182 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 183 | rtc_static_library("apprtc_signaling") { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 184 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 185 | "objc/AppRTCMobile/ARDAppClient+Internal.h", |
| 186 | "objc/AppRTCMobile/ARDAppClient.h", |
| 187 | "objc/AppRTCMobile/ARDAppClient.m", |
| 188 | "objc/AppRTCMobile/ARDAppEngineClient.h", |
| 189 | "objc/AppRTCMobile/ARDAppEngineClient.m", |
| 190 | "objc/AppRTCMobile/ARDBitrateTracker.h", |
| 191 | "objc/AppRTCMobile/ARDBitrateTracker.m", |
| 192 | "objc/AppRTCMobile/ARDCEODTURNClient.h", |
| 193 | "objc/AppRTCMobile/ARDCEODTURNClient.m", |
| 194 | "objc/AppRTCMobile/ARDJoinResponse+Internal.h", |
| 195 | "objc/AppRTCMobile/ARDJoinResponse.h", |
| 196 | "objc/AppRTCMobile/ARDJoinResponse.m", |
| 197 | "objc/AppRTCMobile/ARDMessageResponse+Internal.h", |
| 198 | "objc/AppRTCMobile/ARDMessageResponse.h", |
| 199 | "objc/AppRTCMobile/ARDMessageResponse.m", |
| 200 | "objc/AppRTCMobile/ARDRoomServerClient.h", |
| 201 | "objc/AppRTCMobile/ARDSDPUtils.h", |
| 202 | "objc/AppRTCMobile/ARDSDPUtils.m", |
| 203 | "objc/AppRTCMobile/ARDSignalingChannel.h", |
| 204 | "objc/AppRTCMobile/ARDSignalingMessage.h", |
| 205 | "objc/AppRTCMobile/ARDSignalingMessage.m", |
| 206 | "objc/AppRTCMobile/ARDStatsBuilder.h", |
| 207 | "objc/AppRTCMobile/ARDStatsBuilder.m", |
| 208 | "objc/AppRTCMobile/ARDTURNClient.h", |
| 209 | "objc/AppRTCMobile/ARDWebSocketChannel.h", |
| 210 | "objc/AppRTCMobile/ARDWebSocketChannel.m", |
| 211 | "objc/AppRTCMobile/RTCIceCandidate+JSON.h", |
| 212 | "objc/AppRTCMobile/RTCIceCandidate+JSON.m", |
| 213 | "objc/AppRTCMobile/RTCIceServer+JSON.h", |
| 214 | "objc/AppRTCMobile/RTCIceServer+JSON.m", |
| 215 | "objc/AppRTCMobile/RTCMediaConstraints+JSON.h", |
| 216 | "objc/AppRTCMobile/RTCMediaConstraints+JSON.m", |
| 217 | "objc/AppRTCMobile/RTCSessionDescription+JSON.h", |
| 218 | "objc/AppRTCMobile/RTCSessionDescription+JSON.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 219 | ] |
| 220 | configs += [ |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 221 | "//build/config/compiler:enable_arc", |
| 222 | ":warnings_config", |
| 223 | ] |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 224 | public_configs = [ ":apprtc_signaling_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 225 | deps = [ |
| 226 | ":apprtc_common", |
| 227 | ":socketrocket", |
| 228 | ] |
| 229 | public_deps = [ |
| 230 | "../sdk:rtc_sdk_peerconnection_objc", |
| 231 | ] |
| 232 | libs = [ "QuartzCore.framework" ] |
| 233 | } |
| 234 | |
| 235 | if (is_ios) { |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 236 | rtc_static_library("AppRTCMobile_lib") { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 237 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 238 | "objc/AppRTCMobile/ios/ARDAppDelegate.m", |
| 239 | "objc/AppRTCMobile/ios/ARDMainView.h", |
| 240 | "objc/AppRTCMobile/ios/ARDMainView.m", |
| 241 | "objc/AppRTCMobile/ios/ARDMainViewController.h", |
| 242 | "objc/AppRTCMobile/ios/ARDMainViewController.m", |
denicija | 2256e04 | 2016-11-09 06:26:18 -0800 | [diff] [blame] | 243 | "objc/AppRTCMobile/ios/ARDSettingsModel+Private.h", |
| 244 | "objc/AppRTCMobile/ios/ARDSettingsModel.h", |
| 245 | "objc/AppRTCMobile/ios/ARDSettingsModel.m", |
| 246 | "objc/AppRTCMobile/ios/ARDSettingsStore.h", |
| 247 | "objc/AppRTCMobile/ios/ARDSettingsStore.m", |
denicija | d17d536 | 2016-11-02 02:56:09 -0700 | [diff] [blame] | 248 | "objc/AppRTCMobile/ios/ARDSettingsViewController.h", |
| 249 | "objc/AppRTCMobile/ios/ARDSettingsViewController.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 250 | "objc/AppRTCMobile/ios/ARDStatsView.h", |
| 251 | "objc/AppRTCMobile/ios/ARDStatsView.m", |
| 252 | "objc/AppRTCMobile/ios/ARDVideoCallView.h", |
| 253 | "objc/AppRTCMobile/ios/ARDVideoCallView.m", |
| 254 | "objc/AppRTCMobile/ios/ARDVideoCallViewController.h", |
| 255 | "objc/AppRTCMobile/ios/ARDVideoCallViewController.m", |
| 256 | "objc/AppRTCMobile/ios/AppRTCMobile-Prefix.pch", |
| 257 | "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h", |
| 258 | "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m", |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 259 | ] |
| 260 | configs += [ |
| 261 | "//build/config/compiler:enable_arc", |
| 262 | ":warnings_config", |
| 263 | ] |
| 264 | |
| 265 | deps = [ |
| 266 | ":apprtc_common", |
| 267 | ":apprtc_signaling", |
| 268 | ] |
| 269 | } |
| 270 | |
| 271 | ios_app_bundle("AppRTCMobile") { |
| 272 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 273 | "objc/AppRTCMobile/ios/main.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 274 | ] |
| 275 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 276 | info_plist = "objc/AppRTCMobile/ios/Info.plist" |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 277 | |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 278 | configs += [ "..:common_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 279 | public_configs = [ "..:common_inherited_config" ] |
| 280 | |
| 281 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 282 | ":AppRTCMobile_ios_bundle_data", |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 283 | ":AppRTCMobile_lib", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 284 | ] |
| 285 | |
| 286 | if (target_cpu == "x86") { |
| 287 | deps += [ "//testing/iossim:iossim" ] |
| 288 | } |
| 289 | } |
| 290 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 291 | bundle_data("AppRTCMobile_ios_bundle_data") { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 292 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 293 | "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf", |
| 294 | "objc/AppRTCMobile/ios/resources/iPhone5@2x.png", |
| 295 | "objc/AppRTCMobile/ios/resources/iPhone6@2x.png", |
| 296 | "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png", |
| 297 | "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png", |
| 298 | "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png", |
| 299 | "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png", |
| 300 | "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png", |
denicija | 6d6762c | 2016-10-28 04:53:16 -0700 | [diff] [blame] | 301 | "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png", |
| 302 | "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 303 | "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png", |
| 304 | "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png", |
| 305 | "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png", |
| 306 | "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png", |
| 307 | "objc/AppRTCMobile/ios/resources/mozart.mp3", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 308 | "objc/Icon.png", |
| 309 | ] |
| 310 | outputs = [ |
| 311 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 312 | ] |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | if (is_mac) { |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 317 | rtc_static_library("AppRTCMobile_lib") { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 318 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 319 | "objc/AppRTCMobile/mac/APPRTCAppDelegate.h", |
| 320 | "objc/AppRTCMobile/mac/APPRTCAppDelegate.m", |
| 321 | "objc/AppRTCMobile/mac/APPRTCViewController.h", |
| 322 | "objc/AppRTCMobile/mac/APPRTCViewController.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 323 | ] |
| 324 | configs += [ |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 325 | "..:common_objc", |
| 326 | "//build/config/compiler:enable_arc", |
| 327 | ] |
| 328 | deps = [ |
| 329 | ":apprtc_common", |
| 330 | ":apprtc_signaling", |
| 331 | ] |
| 332 | } |
| 333 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 334 | mac_app_bundle("AppRTCMobile") { |
| 335 | output_name = "AppRTCMobile" |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 336 | |
| 337 | extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ] |
| 338 | |
| 339 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 340 | "objc/AppRTCMobile/mac/main.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 341 | ] |
| 342 | |
| 343 | public_configs = [ "..:common_inherited_config" ] |
| 344 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 345 | info_plist = "objc/AppRTCMobile/mac/Info.plist" |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 346 | |
| 347 | libs = [ "AppKit.framework" ] |
| 348 | |
| 349 | deps = [ |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 350 | ":AppRTCMobile_lib", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 351 | ] |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | config("socketrocket_include_config") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 356 | include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 357 | } |
| 358 | |
| 359 | config("socketrocket_warning_config") { |
| 360 | # GN orders flags on a target before flags from configs. The default config |
| 361 | # adds these flags so to cancel them out they need to come from a config and |
| 362 | # cannot be on the target directly. |
| 363 | cflags = [ |
| 364 | "-Wno-deprecated-declarations", |
| 365 | "-Wno-nonnull", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 366 | "-Wno-semicolon-before-method-body", |
| 367 | "-Wno-unused-variable", |
| 368 | ] |
| 369 | |
henrika | 27d8b61 | 2016-09-21 04:13:00 -0700 | [diff] [blame] | 370 | cflags_objc = [ |
| 371 | # Enabled for cflags_objc in build/config/compiler/BUILD.gn. |
| 372 | "-Wno-objc-missing-property-synthesis", |
| 373 | |
| 374 | # Hide the warning for SecRandomCopyBytes(), until we update to upstream. |
| 375 | # https://bugs.chromium.org/p/webrtc/issues/detail?id=6396 |
| 376 | "-Wno-unused-result", |
| 377 | ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 378 | |
| 379 | if (is_mac) { |
| 380 | cflags += [ "-Wno-partial-availability" ] |
| 381 | } |
| 382 | } |
| 383 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 384 | rtc_static_library("socketrocket") { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 385 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 386 | "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h", |
| 387 | "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 388 | ] |
| 389 | configs += [ |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 390 | "//build/config/compiler:enable_arc", |
| 391 | ":socketrocket_warning_config", |
| 392 | ] |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 393 | public_configs = [ ":socketrocket_include_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 394 | |
| 395 | libs = [ |
| 396 | "CFNetwork.framework", |
| 397 | "icucore", |
| 398 | ] |
| 399 | } |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 400 | |
| 401 | if (rtc_include_tests) { |
| 402 | config("rtc_apprtcmobile_config") { |
| 403 | defines = [ "GTEST_RELATIVE_PATH" ] |
| 404 | } |
| 405 | |
| 406 | rtc_test("apprtcmobile_tests") { |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 407 | include_dirs = [ "objc/AppRTCMobile/ios" ] |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 408 | deps = [ |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 409 | ":AppRTCMobile_lib", |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 410 | ":apprtc_signaling", |
| 411 | "//testing/gtest", |
| 412 | "//third_party/ocmock", |
| 413 | ] |
| 414 | |
| 415 | sources = [ |
| 416 | "objc/AppRTCMobile/tests/ARDAppClientTest.mm", |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 417 | "objc/AppRTCMobile/tests/ARDSettingsModelTests.mm", |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 418 | ] |
| 419 | |
| 420 | if (is_ios) { |
| 421 | info_plist = "objc/AppRTCMobile/ios/Info.plist" |
| 422 | } |
| 423 | |
| 424 | configs += [ |
| 425 | ":rtc_apprtcmobile_config", |
| 426 | "//build/config/compiler:enable_arc", |
| 427 | ] |
| 428 | } |
| 429 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 430 | } |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 431 | |
| 432 | if (is_linux || is_win) { |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 433 | config("peerconnection_client_warnings_config") { |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 434 | cflags = [] |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 435 | if (is_win && is_clang) { |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 436 | cflags += [ |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 437 | # Disable warnings failing when compiling with Clang on Windows. |
| 438 | # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366 |
| 439 | "-Wno-format", |
| 440 | |
| 441 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271 |
| 442 | # for -Wno-reorder and -Wno-sign-compare |
| 443 | "-Wno-reorder", |
| 444 | "-Wno-sign-compare", |
| 445 | ] |
| 446 | } |
kjellander | d4626e5 | 2016-09-07 02:33:01 -0700 | [diff] [blame] | 447 | if (is_linux && target_cpu == "x86") { |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 448 | cflags += [ |
kjellander | d4626e5 | 2016-09-07 02:33:01 -0700 | [diff] [blame] | 449 | # Needed to compile on Linux 32-bit. |
| 450 | "-Wno-sentinel", |
| 451 | ] |
| 452 | } |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 453 | |
| 454 | if (is_clang) { |
| 455 | # TODO(ehmaldonado): Make peerconnection_client compile with the standard |
| 456 | # set of warnings. |
| 457 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306 |
| 458 | cflags += [ "-Wno-inconsistent-missing-override" ] |
| 459 | } |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 460 | } |
| 461 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 462 | rtc_executable("peerconnection_client") { |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 463 | sources = [ |
| 464 | "peerconnection/client/conductor.cc", |
| 465 | "peerconnection/client/conductor.h", |
| 466 | "peerconnection/client/defaults.cc", |
| 467 | "peerconnection/client/defaults.h", |
| 468 | "peerconnection/client/peer_connection_client.cc", |
| 469 | "peerconnection/client/peer_connection_client.h", |
| 470 | ] |
ehmaldonado | 7a2ce0b | 2016-09-05 01:35:44 -0700 | [diff] [blame] | 471 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 472 | if (!build_with_chromium && is_clang) { |
| 473 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 474 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 475 | } |
| 476 | if (is_win) { |
| 477 | sources += [ |
| 478 | "peerconnection/client/flagdefs.h", |
| 479 | "peerconnection/client/main.cc", |
| 480 | "peerconnection/client/main_wnd.cc", |
| 481 | "peerconnection/client/main_wnd.h", |
| 482 | ] |
| 483 | cflags = [ "/wd4245" ] |
| 484 | configs += [ "//build/config/win:windowed" ] |
| 485 | } |
thomasanderson | ef16e99 | 2016-12-13 02:57:43 -0800 | [diff] [blame] | 486 | deps = [ |
| 487 | "//third_party/libyuv", |
| 488 | "//webrtc/api:libjingle_peerconnection", |
| 489 | "//webrtc/system_wrappers:field_trial_default", |
| 490 | "//webrtc/system_wrappers:metrics_default", |
| 491 | ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 492 | if (is_linux) { |
| 493 | sources += [ |
| 494 | "peerconnection/client/linux/main.cc", |
| 495 | "peerconnection/client/linux/main_wnd.cc", |
| 496 | "peerconnection/client/linux/main_wnd.h", |
| 497 | ] |
| 498 | libs = [ |
| 499 | "X11", |
| 500 | "Xcomposite", |
| 501 | "Xext", |
| 502 | "Xrender", |
| 503 | ] |
thomasanderson | ef16e99 | 2016-12-13 02:57:43 -0800 | [diff] [blame] | 504 | deps += [ "//build/config/linux/gtk" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 505 | } |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 506 | configs += [ ":peerconnection_client_warnings_config" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 507 | if (rtc_build_json) { |
| 508 | deps += [ "//third_party/jsoncpp" ] |
| 509 | } |
| 510 | } |
kjellander | d4626e5 | 2016-09-07 02:33:01 -0700 | [diff] [blame] | 511 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 512 | rtc_executable("peerconnection_server") { |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 513 | sources = [ |
| 514 | "peerconnection/server/data_socket.cc", |
| 515 | "peerconnection/server/data_socket.h", |
| 516 | "peerconnection/server/main.cc", |
| 517 | "peerconnection/server/peer_channel.cc", |
| 518 | "peerconnection/server/peer_channel.h", |
| 519 | "peerconnection/server/utils.cc", |
| 520 | "peerconnection/server/utils.h", |
| 521 | ] |
| 522 | deps = [ |
| 523 | "//webrtc:webrtc_common", |
| 524 | "//webrtc/base:rtc_base_approved", |
| 525 | "//webrtc/tools:command_line_parser", |
| 526 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 527 | if (!build_with_chromium && is_clang) { |
| 528 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 529 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 530 | } |
| 531 | } |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 532 | rtc_executable("relayserver") { |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 533 | sources = [ |
| 534 | "relayserver/relayserver_main.cc", |
| 535 | ] |
| 536 | deps = [ |
| 537 | "//webrtc/base:rtc_base_approved", |
| 538 | "//webrtc/pc:rtc_pc", |
| 539 | "//webrtc/system_wrappers:field_trial_default", |
| 540 | "//webrtc/system_wrappers:metrics_default", |
| 541 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 542 | if (!build_with_chromium && is_clang) { |
| 543 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 544 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 545 | } |
| 546 | } |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 547 | rtc_executable("turnserver") { |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 548 | sources = [ |
| 549 | "turnserver/turnserver_main.cc", |
| 550 | ] |
| 551 | deps = [ |
| 552 | "//webrtc/base:rtc_base_approved", |
| 553 | "//webrtc/pc:rtc_pc", |
| 554 | "//webrtc/system_wrappers:field_trial_default", |
| 555 | "//webrtc/system_wrappers:metrics_default", |
| 556 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 557 | if (!build_with_chromium && is_clang) { |
| 558 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 559 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 560 | } |
| 561 | } |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 562 | rtc_executable("stunserver") { |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 563 | sources = [ |
| 564 | "stunserver/stunserver_main.cc", |
| 565 | ] |
| 566 | deps = [ |
| 567 | "//webrtc/base:rtc_base_approved", |
| 568 | "//webrtc/pc:rtc_pc", |
| 569 | "//webrtc/system_wrappers:field_trial_default", |
| 570 | "//webrtc/system_wrappers:metrics_default", |
| 571 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 572 | if (!build_with_chromium && is_clang) { |
| 573 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 574 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 575 | } |
| 576 | } |
| 577 | } |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 578 | |
| 579 | if (!build_with_chromium) { |
| 580 | # Doesn't build within Chrome on Win. |
| 581 | rtc_executable("stun_prober") { |
| 582 | sources = [ |
| 583 | "stunprober/main.cc", |
| 584 | ] |
| 585 | |
| 586 | if (!build_with_chromium && is_clang) { |
| 587 | # Suppress warnings from Chrome's Clang plugins. |
| 588 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 589 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 590 | } |
| 591 | |
| 592 | deps = [ |
| 593 | "../p2p:libstunprober", |
| 594 | "../p2p:rtc_p2p", |
| 595 | "../system_wrappers:field_trial_default", |
| 596 | ] |
| 597 | } |
| 598 | } |