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 | |
mbonadei | 9aa3f0a | 2017-01-24 06:58:22 -0800 | [diff] [blame] | 9 | import("../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", |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 28 | ":AppRTCMobileTestStubbedVideoIO", |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 29 | ] |
| 30 | } |
| 31 | |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 32 | if (!build_with_chromium) { |
| 33 | public_deps += [ ":stun_prober" ] |
| 34 | } |
| 35 | |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 36 | if (is_ios || (is_mac && target_cpu != "x86")) { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 37 | public_deps += [ ":AppRTCMobile" ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 38 | } |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 39 | |
| 40 | if (is_linux || is_win) { |
kjellander | 705ecc5 | 2016-09-15 00:53:26 -0700 | [diff] [blame] | 41 | public_deps += [ |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 42 | ":peerconnection_client", |
| 43 | ":peerconnection_server", |
| 44 | ":relayserver", |
| 45 | ":stunserver", |
| 46 | ":turnserver", |
| 47 | ] |
| 48 | } |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 49 | } |
| 50 | |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 51 | if (is_android) { |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 52 | rtc_android_apk("AppRTCMobile") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 53 | testonly = true |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 54 | apk_name = "AppRTCMobile" |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 55 | android_manifest = "androidapp/AndroidManifest.xml" |
| 56 | |
| 57 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 58 | ":AppRTCMobile_javalib", |
| 59 | ":AppRTCMobile_resources", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 60 | "../rtc_base:base_java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 61 | "//base:base_java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 62 | ] |
| 63 | |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 64 | shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 65 | } |
| 66 | |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 67 | rtc_android_library("AppRTCMobile_javalib") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 68 | testonly = true |
sakal | 07a050f | 2017-02-13 05:58:27 -0800 | [diff] [blame] | 69 | android_manifest = "androidapp/AndroidManifest.xml" |
| 70 | |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 71 | java_files = [ |
| 72 | "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java", |
henrika | c3c2f31 | 2016-12-14 07:36:56 -0800 | [diff] [blame] | 73 | "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 74 | "androidapp/src/org/appspot/apprtc/AppRTCClient.java", |
| 75 | "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java", |
| 76 | "androidapp/src/org/appspot/apprtc/CallActivity.java", |
| 77 | "androidapp/src/org/appspot/apprtc/CallFragment.java", |
| 78 | "androidapp/src/org/appspot/apprtc/CaptureQualityController.java", |
| 79 | "androidapp/src/org/appspot/apprtc/ConnectActivity.java", |
| 80 | "androidapp/src/org/appspot/apprtc/CpuMonitor.java", |
| 81 | "androidapp/src/org/appspot/apprtc/DirectRTCClient.java", |
| 82 | "androidapp/src/org/appspot/apprtc/HudFragment.java", |
| 83 | "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 84 | "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java", |
| 85 | "androidapp/src/org/appspot/apprtc/SettingsActivity.java", |
| 86 | "androidapp/src/org/appspot/apprtc/SettingsFragment.java", |
| 87 | "androidapp/src/org/appspot/apprtc/TCPChannelClient.java", |
| 88 | "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java", |
| 89 | "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java", |
| 90 | "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java", |
| 91 | "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java", |
| 92 | "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 93 | ] |
| 94 | |
| 95 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 96 | ":AppRTCMobile_resources", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 97 | "../modules/audio_device:audio_device_java", |
| 98 | "../rtc_base:base_java", |
| 99 | "../sdk/android:libjingle_peerconnection_java", |
| 100 | "../sdk/android:libjingle_peerconnection_metrics_default_java", |
| 101 | "androidapp/third_party/autobanh:autobanh_java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 102 | ] |
| 103 | } |
| 104 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 105 | android_resources("AppRTCMobile_resources") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 106 | testonly = true |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 107 | resource_dirs = [ "androidapp/res" ] |
| 108 | custom_package = "org.appspot.apprtc" |
| 109 | } |
| 110 | |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 111 | rtc_instrumentation_test_apk("AppRTCMobileTest") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 112 | apk_name = "AppRTCMobileTest" |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 113 | android_manifest = "androidtests/AndroidManifest.xml" |
| 114 | |
sakal | e8aca24 | 2017-01-17 03:32:06 -0800 | [diff] [blame] | 115 | java_files = [ "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java" ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 116 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 117 | apk_under_test = ":AppRTCMobile" |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 118 | |
| 119 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 120 | ":AppRTCMobile_javalib", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 121 | "../sdk/android:libjingle_peerconnection_java", |
sakal | cb79d51 | 2017-01-11 06:21:26 -0800 | [diff] [blame] | 122 | "//third_party/android_support_test_runner:runner_java", |
| 123 | "//third_party/junit", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 124 | ] |
| 125 | } |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 126 | |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 127 | rtc_instrumentation_test_apk("AppRTCMobileTestStubbedVideoIO") { |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 128 | apk_name = "AppRTCMobileTestStubbedVideoIO" |
| 129 | android_manifest = "androidtests/AndroidManifest.xml" |
| 130 | |
oprypin | 30cda5e | 2017-04-24 04:15:13 -0700 | [diff] [blame] | 131 | java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ] |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 132 | |
| 133 | apk_under_test = ":AppRTCMobile" |
| 134 | |
| 135 | deps = [ |
| 136 | ":AppRTCMobile_javalib", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 137 | "../sdk/android:libjingle_peerconnection_java", |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 138 | "//third_party/android_support_test_runner:rules_java", |
| 139 | "//third_party/android_support_test_runner:runner_java", |
| 140 | "//third_party/espresso:espresso_all_java", |
| 141 | "//third_party/hamcrest:hamcrest_java", |
| 142 | "//third_party/junit", |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 143 | ] |
| 144 | |
| 145 | data = [ |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 146 | "../resources/reference_video_640x360_30fps.y4m", |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 147 | ] |
| 148 | } |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 149 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 150 | |
| 151 | if (is_ios || (is_mac && target_cpu != "x86")) { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 152 | config("apprtc_common_config") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 153 | include_dirs = [ "objc/AppRTCMobile/common" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 154 | } |
| 155 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 156 | rtc_static_library("apprtc_common") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 157 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 158 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 159 | "objc/AppRTCMobile/common/ARDUtilities.h", |
| 160 | "objc/AppRTCMobile/common/ARDUtilities.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 161 | ] |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 162 | public_configs = [ ":apprtc_common_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 163 | |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 164 | if (is_ios) { |
kthelgason | 5901d9d | 2017-08-16 07:28:03 -0700 | [diff] [blame] | 165 | deps = [ |
| 166 | ":AppRTCMobile_ios_frameworks", |
| 167 | ] |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 168 | } else { |
kthelgason | 5901d9d | 2017-08-16 07:28:03 -0700 | [diff] [blame] | 169 | deps = [ |
kthelgason | 36d658d | 2017-08-24 05:43:45 -0700 | [diff] [blame] | 170 | "../sdk:common_objc", |
kthelgason | 5901d9d | 2017-08-16 07:28:03 -0700 | [diff] [blame] | 171 | "../system_wrappers:field_trial_default", |
| 172 | "../system_wrappers:metrics_default", |
| 173 | ] |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 174 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 175 | } |
| 176 | |
| 177 | config("apprtc_signaling_config") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 178 | include_dirs = [ "objc/AppRTCMobile" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 179 | |
| 180 | # GN orders flags on a target before flags from configs. The default config |
| 181 | # adds these flags so to cancel them out they need to come from a config and |
| 182 | # cannot be on the target directly. |
| 183 | cflags = [ |
| 184 | "-Wno-sign-compare", |
| 185 | "-Wno-unused-variable", |
| 186 | ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 187 | } |
| 188 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 189 | rtc_static_library("apprtc_signaling") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 190 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 191 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 192 | "objc/AppRTCMobile/ARDAppClient+Internal.h", |
| 193 | "objc/AppRTCMobile/ARDAppClient.h", |
| 194 | "objc/AppRTCMobile/ARDAppClient.m", |
| 195 | "objc/AppRTCMobile/ARDAppEngineClient.h", |
| 196 | "objc/AppRTCMobile/ARDAppEngineClient.m", |
| 197 | "objc/AppRTCMobile/ARDBitrateTracker.h", |
| 198 | "objc/AppRTCMobile/ARDBitrateTracker.m", |
sakal | c522e75 | 2017-04-05 12:17:48 -0700 | [diff] [blame] | 199 | "objc/AppRTCMobile/ARDCaptureController.h", |
| 200 | "objc/AppRTCMobile/ARDCaptureController.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 201 | "objc/AppRTCMobile/ARDJoinResponse+Internal.h", |
| 202 | "objc/AppRTCMobile/ARDJoinResponse.h", |
| 203 | "objc/AppRTCMobile/ARDJoinResponse.m", |
| 204 | "objc/AppRTCMobile/ARDMessageResponse+Internal.h", |
| 205 | "objc/AppRTCMobile/ARDMessageResponse.h", |
| 206 | "objc/AppRTCMobile/ARDMessageResponse.m", |
| 207 | "objc/AppRTCMobile/ARDRoomServerClient.h", |
sakal | c4adacf | 2017-03-28 01:22:48 -0700 | [diff] [blame] | 208 | "objc/AppRTCMobile/ARDSettingsModel+Private.h", |
| 209 | "objc/AppRTCMobile/ARDSettingsModel.h", |
| 210 | "objc/AppRTCMobile/ARDSettingsModel.m", |
| 211 | "objc/AppRTCMobile/ARDSettingsStore.h", |
| 212 | "objc/AppRTCMobile/ARDSettingsStore.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 213 | "objc/AppRTCMobile/ARDSignalingChannel.h", |
| 214 | "objc/AppRTCMobile/ARDSignalingMessage.h", |
| 215 | "objc/AppRTCMobile/ARDSignalingMessage.m", |
| 216 | "objc/AppRTCMobile/ARDStatsBuilder.h", |
| 217 | "objc/AppRTCMobile/ARDStatsBuilder.m", |
kthelgason | cc882af | 2017-01-13 05:59:46 -0800 | [diff] [blame] | 218 | "objc/AppRTCMobile/ARDTURNClient+Internal.h", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 219 | "objc/AppRTCMobile/ARDTURNClient.h", |
kthelgason | cc882af | 2017-01-13 05:59:46 -0800 | [diff] [blame] | 220 | "objc/AppRTCMobile/ARDTURNClient.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 221 | "objc/AppRTCMobile/ARDWebSocketChannel.h", |
| 222 | "objc/AppRTCMobile/ARDWebSocketChannel.m", |
| 223 | "objc/AppRTCMobile/RTCIceCandidate+JSON.h", |
| 224 | "objc/AppRTCMobile/RTCIceCandidate+JSON.m", |
| 225 | "objc/AppRTCMobile/RTCIceServer+JSON.h", |
| 226 | "objc/AppRTCMobile/RTCIceServer+JSON.m", |
| 227 | "objc/AppRTCMobile/RTCMediaConstraints+JSON.h", |
| 228 | "objc/AppRTCMobile/RTCMediaConstraints+JSON.m", |
| 229 | "objc/AppRTCMobile/RTCSessionDescription+JSON.h", |
| 230 | "objc/AppRTCMobile/RTCSessionDescription+JSON.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 231 | ] |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 232 | public_configs = [ ":apprtc_signaling_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 233 | deps = [ |
| 234 | ":apprtc_common", |
| 235 | ":socketrocket", |
| 236 | ] |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 237 | if (is_ios) { |
| 238 | deps += [ ":AppRTCMobile_ios_frameworks" ] |
| 239 | } else { |
| 240 | public_deps = [ |
kthelgason | 36d658d | 2017-08-24 05:43:45 -0700 | [diff] [blame] | 241 | "../sdk:peerconnection_objc", |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 242 | ] |
| 243 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 244 | libs = [ "QuartzCore.framework" ] |
| 245 | } |
| 246 | |
| 247 | if (is_ios) { |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 248 | rtc_static_library("AppRTCMobile_lib") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 249 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 250 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 251 | "objc/AppRTCMobile/ios/ARDAppDelegate.m", |
Daniela | 012b56b | 2017-11-15 13:15:24 +0100 | [diff] [blame] | 252 | "objc/AppRTCMobile/ios/ARDFileCaptureController.h", |
| 253 | "objc/AppRTCMobile/ios/ARDFileCaptureController.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 254 | "objc/AppRTCMobile/ios/ARDMainView.h", |
| 255 | "objc/AppRTCMobile/ios/ARDMainView.m", |
| 256 | "objc/AppRTCMobile/ios/ARDMainViewController.h", |
| 257 | "objc/AppRTCMobile/ios/ARDMainViewController.m", |
denicija | d17d536 | 2016-11-02 02:56:09 -0700 | [diff] [blame] | 258 | "objc/AppRTCMobile/ios/ARDSettingsViewController.h", |
| 259 | "objc/AppRTCMobile/ios/ARDSettingsViewController.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 260 | "objc/AppRTCMobile/ios/ARDStatsView.h", |
| 261 | "objc/AppRTCMobile/ios/ARDStatsView.m", |
| 262 | "objc/AppRTCMobile/ios/ARDVideoCallView.h", |
| 263 | "objc/AppRTCMobile/ios/ARDVideoCallView.m", |
| 264 | "objc/AppRTCMobile/ios/ARDVideoCallViewController.h", |
| 265 | "objc/AppRTCMobile/ios/ARDVideoCallViewController.m", |
Anders Carlsson | 6bf43d2 | 2017-10-16 13:51:43 +0200 | [diff] [blame] | 266 | "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h", |
| 267 | "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 268 | "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h", |
| 269 | "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m", |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 270 | ] |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 271 | |
| 272 | deps = [ |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 273 | ":AppRTCMobile_ios_frameworks", |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 274 | ":apprtc_common", |
| 275 | ":apprtc_signaling", |
| 276 | ] |
| 277 | } |
| 278 | |
| 279 | ios_app_bundle("AppRTCMobile") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 280 | testonly = true |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 281 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 282 | "objc/AppRTCMobile/ios/main.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 283 | ] |
| 284 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 285 | info_plist = "objc/AppRTCMobile/ios/Info.plist" |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 286 | |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 287 | configs += [ "..:common_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 288 | public_configs = [ "..:common_inherited_config" ] |
| 289 | |
| 290 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 291 | ":AppRTCMobile_ios_bundle_data", |
kthelgason | d3adbfb | 2017-01-26 01:14:04 -0800 | [diff] [blame] | 292 | ":AppRTCMobile_ios_frameworks", |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 293 | ":AppRTCMobile_lib", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 294 | ] |
| 295 | |
| 296 | if (target_cpu == "x86") { |
| 297 | deps += [ "//testing/iossim:iossim" ] |
| 298 | } |
| 299 | } |
| 300 | |
kthelgason | d3adbfb | 2017-01-26 01:14:04 -0800 | [diff] [blame] | 301 | bundle_data("AppRTCMobile_ios_frameworks") { |
| 302 | public_deps = [ |
kthelgason | 36d658d | 2017-08-24 05:43:45 -0700 | [diff] [blame] | 303 | "../sdk:framework_objc+link", |
kthelgason | d3adbfb | 2017-01-26 01:14:04 -0800 | [diff] [blame] | 304 | ] |
| 305 | sources = [ |
wjywbs | bef8a5d | 2017-10-09 02:32:28 -0400 | [diff] [blame] | 306 | "$root_build_dir/WebRTC.framework", |
kthelgason | d3adbfb | 2017-01-26 01:14:04 -0800 | [diff] [blame] | 307 | ] |
| 308 | outputs = [ |
| 309 | "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}", |
| 310 | ] |
| 311 | } |
| 312 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 313 | bundle_data("AppRTCMobile_ios_bundle_data") { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 314 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 315 | "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf", |
Daniela | 012b56b | 2017-11-15 13:15:24 +0100 | [diff] [blame] | 316 | |
| 317 | # Sample video taken from https://media.xiph.org/video/derf/ |
| 318 | "objc/AppRTCMobile/ios/resources/foreman.mp4", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 319 | "objc/AppRTCMobile/ios/resources/iPhone5@2x.png", |
| 320 | "objc/AppRTCMobile/ios/resources/iPhone6@2x.png", |
| 321 | "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png", |
| 322 | "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png", |
| 323 | "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png", |
| 324 | "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png", |
| 325 | "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png", |
denicija | 6d6762c | 2016-10-28 04:53:16 -0700 | [diff] [blame] | 326 | "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png", |
| 327 | "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 328 | "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png", |
| 329 | "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png", |
| 330 | "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png", |
| 331 | "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png", |
| 332 | "objc/AppRTCMobile/ios/resources/mozart.mp3", |
andersc | b5ed905 | 2017-08-15 04:07:12 -0700 | [diff] [blame] | 333 | "objc/Icon-120.png", |
| 334 | "objc/Icon-180.png", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 335 | "objc/Icon.png", |
| 336 | ] |
| 337 | outputs = [ |
| 338 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 339 | ] |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | if (is_mac) { |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 344 | rtc_static_library("AppRTCMobile_lib") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 345 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 346 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 347 | "objc/AppRTCMobile/mac/APPRTCAppDelegate.h", |
| 348 | "objc/AppRTCMobile/mac/APPRTCAppDelegate.m", |
| 349 | "objc/AppRTCMobile/mac/APPRTCViewController.h", |
| 350 | "objc/AppRTCMobile/mac/APPRTCViewController.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 351 | ] |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 352 | configs += [ "..:common_objc" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 353 | deps = [ |
| 354 | ":apprtc_common", |
| 355 | ":apprtc_signaling", |
kthelgason | 36d658d | 2017-08-24 05:43:45 -0700 | [diff] [blame] | 356 | "../sdk:ui_objc", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 357 | ] |
| 358 | } |
| 359 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 360 | mac_app_bundle("AppRTCMobile") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 361 | testonly = true |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 362 | output_name = "AppRTCMobile" |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 363 | |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 364 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 365 | "objc/AppRTCMobile/mac/main.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 366 | ] |
| 367 | |
| 368 | public_configs = [ "..:common_inherited_config" ] |
| 369 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 370 | info_plist = "objc/AppRTCMobile/mac/Info.plist" |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 371 | |
| 372 | libs = [ "AppKit.framework" ] |
| 373 | |
| 374 | deps = [ |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 375 | ":AppRTCMobile_lib", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 376 | ] |
| 377 | } |
| 378 | } |
| 379 | |
| 380 | config("socketrocket_include_config") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 381 | include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 382 | } |
| 383 | |
| 384 | config("socketrocket_warning_config") { |
| 385 | # GN orders flags on a target before flags from configs. The default config |
| 386 | # adds these flags so to cancel them out they need to come from a config and |
| 387 | # cannot be on the target directly. |
| 388 | cflags = [ |
| 389 | "-Wno-deprecated-declarations", |
| 390 | "-Wno-nonnull", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 391 | "-Wno-semicolon-before-method-body", |
kthelgason | e47de1a | 2017-02-24 01:56:01 -0800 | [diff] [blame] | 392 | "-Wno-unused-variable", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 393 | ] |
| 394 | |
henrika | 27d8b61 | 2016-09-21 04:13:00 -0700 | [diff] [blame] | 395 | cflags_objc = [ |
| 396 | # Enabled for cflags_objc in build/config/compiler/BUILD.gn. |
| 397 | "-Wno-objc-missing-property-synthesis", |
henrika | 27d8b61 | 2016-09-21 04:13:00 -0700 | [diff] [blame] | 398 | ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 399 | } |
| 400 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 401 | rtc_static_library("socketrocket") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 402 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 403 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 404 | "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h", |
| 405 | "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 406 | ] |
kthelgason | c097710 | 2017-04-24 00:57:16 -0700 | [diff] [blame] | 407 | configs += [ ":socketrocket_warning_config" ] |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 408 | public_configs = [ ":socketrocket_include_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 409 | |
| 410 | libs = [ |
| 411 | "CFNetwork.framework", |
| 412 | "icucore", |
| 413 | ] |
| 414 | } |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 415 | |
| 416 | if (rtc_include_tests) { |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 417 | # TODO(kthelgason): compile xctests on mac when chromium supports it. |
| 418 | if (is_ios) { |
| 419 | rtc_source_set("apprtcmobile_test_sources") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 420 | testonly = true |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 421 | include_dirs = [ |
| 422 | "objc/AppRTCMobile", |
| 423 | "objc/AppRTCMobile/ios", |
| 424 | ] |
| 425 | testonly = true |
| 426 | sources = [ |
| 427 | "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm", |
Daniela | 012b56b | 2017-11-15 13:15:24 +0100 | [diff] [blame] | 428 | "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm", |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 429 | "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm", |
| 430 | ] |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 431 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 432 | "../rtc_base:rtc_base", |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 433 | ] |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 434 | public_deps = [ |
| 435 | ":AppRTCMobile_ios_frameworks", |
| 436 | ":AppRTCMobile_lib", |
| 437 | "//build/config/ios:xctest", |
| 438 | "//third_party/ocmock", |
| 439 | ] |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 440 | } |
| 441 | |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 442 | rtc_ios_xctest_test("apprtcmobile_tests") { |
| 443 | info_plist = "objc/AppRTCMobile/ios/Info.plist" |
| 444 | sources = [ |
| 445 | "objc/AppRTCMobile/ios/main.m", |
| 446 | ] |
| 447 | deps = [ |
| 448 | ":apprtcmobile_test_sources", |
| 449 | ] |
| 450 | ldflags = [ "-all_load" ] |
| 451 | } |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 452 | } |
| 453 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 454 | } |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 455 | |
| 456 | if (is_linux || is_win) { |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 457 | config("peerconnection_client_warnings_config") { |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 458 | cflags = [] |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 459 | if (is_win && is_clang) { |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 460 | cflags += [ |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 461 | # Disable warnings failing when compiling with Clang on Windows. |
| 462 | # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366 |
| 463 | "-Wno-format", |
| 464 | |
| 465 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271 |
| 466 | # for -Wno-reorder and -Wno-sign-compare |
| 467 | "-Wno-reorder", |
| 468 | "-Wno-sign-compare", |
| 469 | ] |
| 470 | } |
kjellander | d4626e5 | 2016-09-07 02:33:01 -0700 | [diff] [blame] | 471 | if (is_linux && target_cpu == "x86") { |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 472 | cflags += [ |
kjellander | d4626e5 | 2016-09-07 02:33:01 -0700 | [diff] [blame] | 473 | # Needed to compile on Linux 32-bit. |
| 474 | "-Wno-sentinel", |
| 475 | ] |
| 476 | } |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 477 | |
| 478 | if (is_clang) { |
| 479 | # TODO(ehmaldonado): Make peerconnection_client compile with the standard |
| 480 | # set of warnings. |
| 481 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306 |
| 482 | cflags += [ "-Wno-inconsistent-missing-override" ] |
| 483 | } |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 484 | } |
| 485 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 486 | rtc_executable("peerconnection_client") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 487 | testonly = true |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 488 | sources = [ |
| 489 | "peerconnection/client/conductor.cc", |
| 490 | "peerconnection/client/conductor.h", |
| 491 | "peerconnection/client/defaults.cc", |
| 492 | "peerconnection/client/defaults.h", |
| 493 | "peerconnection/client/peer_connection_client.cc", |
| 494 | "peerconnection/client/peer_connection_client.h", |
| 495 | ] |
ehmaldonado | 7a2ce0b | 2016-09-05 01:35:44 -0700 | [diff] [blame] | 496 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 497 | if (!build_with_chromium && is_clang) { |
| 498 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 499 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 500 | } |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 501 | deps = [ |
| 502 | "../api:video_frame_api_i420", |
| 503 | ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 504 | if (is_win) { |
| 505 | sources += [ |
| 506 | "peerconnection/client/flagdefs.h", |
| 507 | "peerconnection/client/main.cc", |
| 508 | "peerconnection/client/main_wnd.cc", |
| 509 | "peerconnection/client/main_wnd.h", |
| 510 | ] |
| 511 | cflags = [ "/wd4245" ] |
| 512 | configs += [ "//build/config/win:windowed" ] |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 513 | deps += [ "../media:rtc_media_base" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 514 | } |
| 515 | if (is_linux) { |
| 516 | sources += [ |
| 517 | "peerconnection/client/linux/main.cc", |
| 518 | "peerconnection/client/linux/main_wnd.cc", |
| 519 | "peerconnection/client/linux/main_wnd.h", |
| 520 | ] |
Henrik Kjellander | efbde2c | 2017-03-27 08:28:27 +0200 | [diff] [blame] | 521 | cflags = [ "-Wno-deprecated-declarations" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 522 | libs = [ |
| 523 | "X11", |
| 524 | "Xcomposite", |
| 525 | "Xext", |
| 526 | "Xrender", |
| 527 | ] |
thomasanderson | ef16e99 | 2016-12-13 02:57:43 -0800 | [diff] [blame] | 528 | deps += [ "//build/config/linux/gtk" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 529 | } |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 530 | configs += [ ":peerconnection_client_warnings_config" ] |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 531 | |
| 532 | deps += [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 533 | "../api:libjingle_peerconnection_test_api", |
| 534 | "../api:video_frame_api", |
Karl Wiberg | 1b0eae3 | 2017-10-17 14:48:54 +0200 | [diff] [blame] | 535 | "../api/audio_codecs:builtin_audio_decoder_factory", |
| 536 | "../api/audio_codecs:builtin_audio_encoder_factory", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 537 | "../media:rtc_media", |
| 538 | "../modules/video_capture:video_capture_module", |
| 539 | "../pc:libjingle_peerconnection", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 540 | "../rtc_base:rtc_base", |
| 541 | "../rtc_base:rtc_base_approved", |
| 542 | "../rtc_base:rtc_json", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 543 | "../system_wrappers:field_trial_default", |
| 544 | "../system_wrappers:metrics_default", |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 545 | "//third_party/libyuv", |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 546 | ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 547 | } |
kjellander | d4626e5 | 2016-09-07 02:33:01 -0700 | [diff] [blame] | 548 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 549 | rtc_executable("peerconnection_server") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 550 | testonly = true |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 551 | sources = [ |
| 552 | "peerconnection/server/data_socket.cc", |
| 553 | "peerconnection/server/data_socket.h", |
| 554 | "peerconnection/server/main.cc", |
| 555 | "peerconnection/server/peer_channel.cc", |
| 556 | "peerconnection/server/peer_channel.h", |
| 557 | "peerconnection/server/utils.cc", |
| 558 | "peerconnection/server/utils.h", |
| 559 | ] |
| 560 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 561 | "..:webrtc_common", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 562 | "../rtc_base:rtc_base_approved", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 563 | "../rtc_tools:command_line_parser", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 564 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 565 | if (!build_with_chromium && is_clang) { |
| 566 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 567 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 568 | } |
| 569 | } |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 570 | rtc_executable("relayserver") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 571 | testonly = true |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 572 | sources = [ |
| 573 | "relayserver/relayserver_main.cc", |
| 574 | ] |
| 575 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 576 | "../p2p:rtc_p2p", |
| 577 | "../pc:rtc_pc", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 578 | "../rtc_base:rtc_base", |
| 579 | "../rtc_base:rtc_base_approved", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 580 | "../system_wrappers:field_trial_default", |
| 581 | "../system_wrappers:metrics_default", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 582 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 583 | if (!build_with_chromium && is_clang) { |
| 584 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 585 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 586 | } |
| 587 | } |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 588 | rtc_executable("turnserver") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 589 | testonly = true |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 590 | sources = [ |
| 591 | "turnserver/turnserver_main.cc", |
| 592 | ] |
| 593 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 594 | "../p2p:rtc_p2p", |
| 595 | "../pc:rtc_pc", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 596 | "../rtc_base:rtc_base", |
| 597 | "../rtc_base:rtc_base_approved", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 598 | "../system_wrappers:field_trial_default", |
| 599 | "../system_wrappers:metrics_default", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 600 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 601 | if (!build_with_chromium && is_clang) { |
| 602 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 603 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 604 | } |
| 605 | } |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 606 | rtc_executable("stunserver") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 607 | testonly = true |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 608 | sources = [ |
| 609 | "stunserver/stunserver_main.cc", |
| 610 | ] |
| 611 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 612 | "../p2p:rtc_p2p", |
| 613 | "../pc:rtc_pc", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 614 | "../rtc_base:rtc_base", |
| 615 | "../rtc_base:rtc_base_approved", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 616 | "../system_wrappers:field_trial_default", |
| 617 | "../system_wrappers:metrics_default", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 618 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 619 | if (!build_with_chromium && is_clang) { |
| 620 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 621 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 622 | } |
| 623 | } |
| 624 | } |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 625 | |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 626 | if (is_win || is_android) { |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 627 | rtc_shared_library("webrtc_unity_plugin") { |
| 628 | testonly = true |
| 629 | sources = [ |
| 630 | "unityplugin/simple_peer_connection.cc", |
| 631 | "unityplugin/simple_peer_connection.h", |
| 632 | "unityplugin/unity_plugin_apis.cc", |
| 633 | "unityplugin/unity_plugin_apis.h", |
gyzhou | b38f386 | 2017-07-25 16:04:31 -0700 | [diff] [blame] | 634 | "unityplugin/video_observer.cc", |
| 635 | "unityplugin/video_observer.h", |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 636 | ] |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 637 | |
| 638 | if (is_android) { |
| 639 | sources += [ |
| 640 | "unityplugin/classreferenceholder.cc", |
| 641 | "unityplugin/classreferenceholder.h", |
| 642 | "unityplugin/jni_onload.cc", |
| 643 | ] |
| 644 | } |
| 645 | |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 646 | if (!build_with_chromium && is_clang) { |
| 647 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 648 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 649 | } |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 650 | if (is_win) { |
| 651 | cflags = [ "/wd4245" ] |
| 652 | configs += [ |
| 653 | "//build/config/win:windowed", |
| 654 | ":peerconnection_client_warnings_config", |
| 655 | ] |
| 656 | } |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 657 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 658 | "../api:libjingle_peerconnection_test_api", |
| 659 | "../api:video_frame_api", |
Qiang Chen | 51e2046 | 2017-12-05 11:11:21 -0800 | [diff] [blame^] | 660 | "../api/audio_codecs:builtin_audio_decoder_factory", |
| 661 | "../api/audio_codecs:builtin_audio_encoder_factory", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 662 | "../media:rtc_media", |
| 663 | "../media:rtc_media_base", |
| 664 | "../modules/video_capture:video_capture_module", |
| 665 | "../pc:libjingle_peerconnection", |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 666 | "../rtc_base:rtc_base", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 667 | "../system_wrappers:field_trial_default", |
| 668 | "../system_wrappers:metrics_default", |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 669 | ] |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 670 | if (is_android) { |
| 671 | deps += [ "../sdk/android:libjingle_peerconnection_jni" ] |
| 672 | } |
| 673 | } |
| 674 | } |
| 675 | |
| 676 | if (is_android) { |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 677 | rtc_android_library("webrtc_unity_java") { |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 678 | java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ] |
| 679 | deps = [ |
| 680 | "../rtc_base:base_java", |
| 681 | "../sdk/android:libjingle_peerconnection_java", |
| 682 | ] |
| 683 | } |
| 684 | |
| 685 | dist_jar("libwebrtc_unity") { |
| 686 | _target_dir_name = get_label_info(":$target_name", "dir") |
| 687 | output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar" |
| 688 | direct_deps_only = true |
| 689 | use_interface_jars = false |
Oleh Prypin | 86021d9 | 2017-09-24 22:29:06 +0200 | [diff] [blame] | 690 | requires_android = true |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 691 | deps = [ |
| 692 | ":webrtc_unity_java", |
| 693 | "../modules/audio_device:audio_device_java", |
| 694 | "../rtc_base:base_java", |
| 695 | "../sdk/android:libjingle_peerconnection_java", |
| 696 | "../sdk/android:libjingle_peerconnection_metrics_default_java", |
| 697 | ] |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 698 | } |
| 699 | } |
| 700 | |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 701 | if (!build_with_chromium) { |
| 702 | # Doesn't build within Chrome on Win. |
| 703 | rtc_executable("stun_prober") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 704 | testonly = true |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 705 | sources = [ |
| 706 | "stunprober/main.cc", |
| 707 | ] |
| 708 | |
| 709 | if (!build_with_chromium && is_clang) { |
| 710 | # Suppress warnings from Chrome's Clang plugins. |
| 711 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 712 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 713 | } |
| 714 | |
| 715 | deps = [ |
| 716 | "../p2p:libstunprober", |
| 717 | "../p2p:rtc_p2p", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 718 | "../rtc_base:rtc_base", |
| 719 | "../rtc_base:rtc_base_approved", |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 720 | "../system_wrappers:field_trial_default", |
| 721 | ] |
| 722 | } |
| 723 | } |