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