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