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