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