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