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