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", |
Qingsi Wang | a4e72b7 | 2018-02-12 10:34:18 -0800 | [diff] [blame] | 86 | "androidapp/src/org/appspot/apprtc/RtcEventLog.java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 87 | "androidapp/src/org/appspot/apprtc/SettingsActivity.java", |
| 88 | "androidapp/src/org/appspot/apprtc/SettingsFragment.java", |
| 89 | "androidapp/src/org/appspot/apprtc/TCPChannelClient.java", |
| 90 | "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java", |
| 91 | "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java", |
| 92 | "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java", |
| 93 | "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java", |
| 94 | "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 95 | ] |
| 96 | |
| 97 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 98 | ":AppRTCMobile_resources", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 99 | "../modules/audio_device:audio_device_java", |
| 100 | "../rtc_base:base_java", |
| 101 | "../sdk/android:libjingle_peerconnection_java", |
| 102 | "../sdk/android:libjingle_peerconnection_metrics_default_java", |
| 103 | "androidapp/third_party/autobanh:autobanh_java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 104 | ] |
| 105 | } |
| 106 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 107 | android_resources("AppRTCMobile_resources") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 108 | testonly = true |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 109 | resource_dirs = [ "androidapp/res" ] |
| 110 | custom_package = "org.appspot.apprtc" |
| 111 | } |
| 112 | |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 113 | rtc_instrumentation_test_apk("AppRTCMobileTest") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 114 | apk_name = "AppRTCMobileTest" |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 115 | android_manifest = "androidtests/AndroidManifest.xml" |
| 116 | |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 117 | java_files = [ |
| 118 | "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java", |
| 119 | ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 120 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 121 | apk_under_test = ":AppRTCMobile" |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 122 | |
| 123 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 124 | ":AppRTCMobile_javalib", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 125 | "../sdk/android:libjingle_peerconnection_java", |
sakal | cb79d51 | 2017-01-11 06:21:26 -0800 | [diff] [blame] | 126 | "//third_party/android_support_test_runner:runner_java", |
| 127 | "//third_party/junit", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 128 | ] |
| 129 | } |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 130 | |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 131 | rtc_instrumentation_test_apk("AppRTCMobileTestStubbedVideoIO") { |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 132 | apk_name = "AppRTCMobileTestStubbedVideoIO" |
| 133 | android_manifest = "androidtests/AndroidManifest.xml" |
| 134 | |
oprypin | 30cda5e | 2017-04-24 04:15:13 -0700 | [diff] [blame] | 135 | java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ] |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 136 | |
| 137 | apk_under_test = ":AppRTCMobile" |
| 138 | |
| 139 | deps = [ |
| 140 | ":AppRTCMobile_javalib", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 141 | "../sdk/android:libjingle_peerconnection_java", |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 142 | "//third_party/android_support_test_runner:rules_java", |
| 143 | "//third_party/android_support_test_runner:runner_java", |
| 144 | "//third_party/espresso:espresso_all_java", |
| 145 | "//third_party/hamcrest:hamcrest_java", |
| 146 | "//third_party/junit", |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 147 | ] |
| 148 | |
| 149 | data = [ |
Edward Lemur | 70ba9b4 | 2018-01-22 13:46:58 +0100 | [diff] [blame] | 150 | "../build/android/adb_reverse_forwarder.py", |
| 151 | "../examples/androidtests/video_quality_loopback_test.py", |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 152 | "../resources/reference_video_640x360_30fps.y4m", |
Edward Lemur | 70ba9b4 | 2018-01-22 13:46:58 +0100 | [diff] [blame] | 153 | "../rtc_tools/barcode_tools/barcode_decoder.py", |
| 154 | "../rtc_tools/barcode_tools/helper_functions.py", |
| 155 | "../rtc_tools/compare_videos.py", |
| 156 | "../rtc_tools/testing/prebuilt_apprtc.zip", |
| 157 | "../rtc_tools/testing/golang/linux/go.tar.gz", |
| 158 | "../rtc_tools/testing/build_apprtc.py", |
| 159 | "../rtc_tools/testing/utils.py", |
| 160 | "../tools_webrtc/video_quality_toolchain/linux/ffmpeg", |
| 161 | "../tools_webrtc/video_quality_toolchain/linux/frame_analyzer", |
| 162 | "../tools_webrtc/video_quality_toolchain/linux/zxing", |
mandermo | a6069e8 | 2017-01-16 02:23:09 -0800 | [diff] [blame] | 163 | ] |
| 164 | } |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 165 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 166 | |
| 167 | if (is_ios || (is_mac && target_cpu != "x86")) { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 168 | config("apprtc_common_config") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 169 | include_dirs = [ "objc/AppRTCMobile/common" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 170 | } |
| 171 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 172 | rtc_static_library("apprtc_common") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 173 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 174 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 175 | "objc/AppRTCMobile/common/ARDUtilities.h", |
| 176 | "objc/AppRTCMobile/common/ARDUtilities.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 177 | ] |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 178 | public_configs = [ ":apprtc_common_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 179 | |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 180 | if (is_ios) { |
kthelgason | 5901d9d | 2017-08-16 07:28:03 -0700 | [diff] [blame] | 181 | deps = [ |
Kári Tristan Helgason | 99bf77c | 2018-02-16 10:49:22 +0100 | [diff] [blame] | 182 | "../sdk:framework_objc", |
Mirko Bonadei | 1a339c3 | 2017-12-14 13:06:10 +0100 | [diff] [blame] | 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 { |
Kári Tristan Helgason | 99bf77c | 2018-02-16 10:49:22 +0100 | [diff] [blame] | 262 | deps += [ "../sdk:peerconnectionfactory_base_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", |
Kári Tristan Helgason | 99bf77c | 2018-02-16 10:49:22 +0100 | [diff] [blame] | 379 | "../sdk:default_codec_factory_objc", |
Mirko Bonadei | 1a339c3 | 2017-12-14 13:06:10 +0100 | [diff] [blame] | 380 | "../sdk:metal_objc", |
kthelgason | 36d658d | 2017-08-24 05:43:45 -0700 | [diff] [blame] | 381 | "../sdk:ui_objc", |
Kári Tristan Helgason | 99bf77c | 2018-02-16 10:49:22 +0100 | [diff] [blame] | 382 | "../sdk:videocodec_objc", |
| 383 | "../sdk:videotoolbox_objc", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 384 | ] |
| 385 | } |
| 386 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 387 | mac_app_bundle("AppRTCMobile") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 388 | testonly = true |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 389 | output_name = "AppRTCMobile" |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 390 | |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 391 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 392 | "objc/AppRTCMobile/mac/main.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 393 | ] |
| 394 | |
| 395 | public_configs = [ "..:common_inherited_config" ] |
| 396 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 397 | info_plist = "objc/AppRTCMobile/mac/Info.plist" |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 398 | |
| 399 | libs = [ "AppKit.framework" ] |
| 400 | |
| 401 | deps = [ |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 402 | ":AppRTCMobile_lib", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 403 | ] |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | config("socketrocket_include_config") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 408 | include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 409 | } |
| 410 | |
| 411 | config("socketrocket_warning_config") { |
| 412 | # GN orders flags on a target before flags from configs. The default config |
| 413 | # adds these flags so to cancel them out they need to come from a config and |
| 414 | # cannot be on the target directly. |
| 415 | cflags = [ |
| 416 | "-Wno-deprecated-declarations", |
| 417 | "-Wno-nonnull", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 418 | "-Wno-semicolon-before-method-body", |
kthelgason | e47de1a | 2017-02-24 01:56:01 -0800 | [diff] [blame] | 419 | "-Wno-unused-variable", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 420 | ] |
| 421 | |
henrika | 27d8b61 | 2016-09-21 04:13:00 -0700 | [diff] [blame] | 422 | cflags_objc = [ |
| 423 | # Enabled for cflags_objc in build/config/compiler/BUILD.gn. |
| 424 | "-Wno-objc-missing-property-synthesis", |
henrika | 27d8b61 | 2016-09-21 04:13:00 -0700 | [diff] [blame] | 425 | ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 426 | } |
| 427 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 428 | rtc_static_library("socketrocket") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 429 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 430 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 431 | "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h", |
| 432 | "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 433 | ] |
kthelgason | c097710 | 2017-04-24 00:57:16 -0700 | [diff] [blame] | 434 | configs += [ ":socketrocket_warning_config" ] |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 435 | public_configs = [ ":socketrocket_include_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 436 | |
| 437 | libs = [ |
| 438 | "CFNetwork.framework", |
| 439 | "icucore", |
| 440 | ] |
| 441 | } |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 442 | |
| 443 | if (rtc_include_tests) { |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 444 | # TODO(kthelgason): compile xctests on mac when chromium supports it. |
| 445 | if (is_ios) { |
| 446 | rtc_source_set("apprtcmobile_test_sources") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 447 | testonly = true |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 448 | include_dirs = [ |
| 449 | "objc/AppRTCMobile", |
| 450 | "objc/AppRTCMobile/ios", |
| 451 | ] |
| 452 | testonly = true |
| 453 | sources = [ |
| 454 | "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm", |
Daniela | 012b56b | 2017-11-15 13:15:24 +0100 | [diff] [blame] | 455 | "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm", |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 456 | "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm", |
| 457 | ] |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 458 | deps = [ |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 459 | ":AppRTCMobile_ios_frameworks", |
| 460 | ":AppRTCMobile_lib", |
Mirko Bonadei | 1a339c3 | 2017-12-14 13:06:10 +0100 | [diff] [blame] | 461 | "../rtc_base:rtc_base", |
| 462 | "../sdk:framework_objc", |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 463 | "//build/config/ios:xctest", |
| 464 | "//third_party/ocmock", |
| 465 | ] |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 466 | } |
| 467 | |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 468 | rtc_ios_xctest_test("apprtcmobile_tests") { |
| 469 | info_plist = "objc/AppRTCMobile/ios/Info.plist" |
| 470 | sources = [ |
| 471 | "objc/AppRTCMobile/ios/main.m", |
| 472 | ] |
| 473 | deps = [ |
| 474 | ":apprtcmobile_test_sources", |
Mirko Bonadei | 1a339c3 | 2017-12-14 13:06:10 +0100 | [diff] [blame] | 475 | "../sdk:framework_objc", |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 476 | ] |
| 477 | ldflags = [ "-all_load" ] |
| 478 | } |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 479 | } |
| 480 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 481 | } |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 482 | |
| 483 | if (is_linux || is_win) { |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 484 | config("peerconnection_client_warnings_config") { |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 485 | cflags = [] |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 486 | if (is_win && is_clang) { |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 487 | cflags += [ |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 488 | # Disable warnings failing when compiling with Clang on Windows. |
| 489 | # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366 |
| 490 | "-Wno-format", |
| 491 | |
| 492 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271 |
| 493 | # for -Wno-reorder and -Wno-sign-compare |
| 494 | "-Wno-reorder", |
| 495 | "-Wno-sign-compare", |
| 496 | ] |
| 497 | } |
kjellander | d4626e5 | 2016-09-07 02:33:01 -0700 | [diff] [blame] | 498 | if (is_linux && target_cpu == "x86") { |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 499 | cflags += [ |
kjellander | d4626e5 | 2016-09-07 02:33:01 -0700 | [diff] [blame] | 500 | # Needed to compile on Linux 32-bit. |
| 501 | "-Wno-sentinel", |
| 502 | ] |
| 503 | } |
kjellander | 4a9abad | 2016-09-18 08:12:29 -0700 | [diff] [blame] | 504 | |
| 505 | if (is_clang) { |
| 506 | # TODO(ehmaldonado): Make peerconnection_client compile with the standard |
| 507 | # set of warnings. |
| 508 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306 |
| 509 | cflags += [ "-Wno-inconsistent-missing-override" ] |
| 510 | } |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 511 | } |
| 512 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 513 | rtc_executable("peerconnection_client") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 514 | testonly = true |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 515 | sources = [ |
| 516 | "peerconnection/client/conductor.cc", |
| 517 | "peerconnection/client/conductor.h", |
| 518 | "peerconnection/client/defaults.cc", |
| 519 | "peerconnection/client/defaults.h", |
| 520 | "peerconnection/client/peer_connection_client.cc", |
| 521 | "peerconnection/client/peer_connection_client.h", |
| 522 | ] |
ehmaldonado | 7a2ce0b | 2016-09-05 01:35:44 -0700 | [diff] [blame] | 523 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 524 | if (!build_with_chromium && is_clang) { |
| 525 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 526 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 527 | } |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 528 | deps = [ |
Mirko Bonadei | 34814c7 | 2018-01-11 10:13:56 +0100 | [diff] [blame] | 529 | "../api:libjingle_peerconnection_api", |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 530 | "../api:video_frame_api_i420", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 531 | "../rtc_base:checks", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 532 | "../rtc_base:stringutils", |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 533 | ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 534 | if (is_win) { |
| 535 | sources += [ |
| 536 | "peerconnection/client/flagdefs.h", |
| 537 | "peerconnection/client/main.cc", |
| 538 | "peerconnection/client/main_wnd.cc", |
| 539 | "peerconnection/client/main_wnd.h", |
| 540 | ] |
| 541 | cflags = [ "/wd4245" ] |
| 542 | configs += [ "//build/config/win:windowed" ] |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 543 | deps += [ "../media:rtc_media_base" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 544 | } |
| 545 | if (is_linux) { |
| 546 | sources += [ |
| 547 | "peerconnection/client/linux/main.cc", |
| 548 | "peerconnection/client/linux/main_wnd.cc", |
| 549 | "peerconnection/client/linux/main_wnd.h", |
| 550 | ] |
Henrik Kjellander | efbde2c | 2017-03-27 08:28:27 +0200 | [diff] [blame] | 551 | cflags = [ "-Wno-deprecated-declarations" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 552 | libs = [ |
| 553 | "X11", |
| 554 | "Xcomposite", |
| 555 | "Xext", |
| 556 | "Xrender", |
| 557 | ] |
thomasanderson | ef16e99 | 2016-12-13 02:57:43 -0800 | [diff] [blame] | 558 | deps += [ "//build/config/linux/gtk" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 559 | } |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 560 | configs += [ ":peerconnection_client_warnings_config" ] |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 561 | |
| 562 | deps += [ |
Niels Möller | 8366e17 | 2018-02-14 12:20:13 +0100 | [diff] [blame] | 563 | "../api:libjingle_peerconnection_api", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 564 | "../api:libjingle_peerconnection_test_api", |
| 565 | "../api:video_frame_api", |
Karl Wiberg | 1b0eae3 | 2017-10-17 14:48:54 +0200 | [diff] [blame] | 566 | "../api/audio_codecs:builtin_audio_decoder_factory", |
| 567 | "../api/audio_codecs:builtin_audio_encoder_factory", |
Mirko Bonadei | 75baa49 | 2018-01-11 17:07:30 +0100 | [diff] [blame] | 568 | "../media:rtc_audio_video", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 569 | "../modules/video_capture:video_capture_module", |
| 570 | "../pc:libjingle_peerconnection", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 571 | "../rtc_base:rtc_base", |
| 572 | "../rtc_base:rtc_base_approved", |
| 573 | "../rtc_base:rtc_json", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 574 | "../system_wrappers:field_trial_default", |
| 575 | "../system_wrappers:metrics_default", |
Ilya Nikolaevskiy | 2ffe3e8 | 2018-01-17 19:57:24 +0000 | [diff] [blame] | 576 | "../system_wrappers:runtime_enabled_features_default", |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 577 | "//third_party/libyuv", |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 578 | ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 579 | } |
kjellander | d4626e5 | 2016-09-07 02:33:01 -0700 | [diff] [blame] | 580 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 581 | rtc_executable("peerconnection_server") { |
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 | "peerconnection/server/data_socket.cc", |
| 585 | "peerconnection/server/data_socket.h", |
| 586 | "peerconnection/server/main.cc", |
| 587 | "peerconnection/server/peer_channel.cc", |
| 588 | "peerconnection/server/peer_channel.h", |
| 589 | "peerconnection/server/utils.cc", |
| 590 | "peerconnection/server/utils.h", |
| 591 | ] |
| 592 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 593 | "..:webrtc_common", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 594 | "../rtc_base:rtc_base_approved", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 595 | "../rtc_base:stringutils", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 596 | "../rtc_tools:command_line_parser", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 597 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 598 | if (!build_with_chromium && is_clang) { |
| 599 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 600 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 601 | } |
| 602 | } |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 603 | rtc_executable("relayserver") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 604 | testonly = true |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 605 | sources = [ |
| 606 | "relayserver/relayserver_main.cc", |
| 607 | ] |
| 608 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 609 | "../p2p:rtc_p2p", |
| 610 | "../pc:rtc_pc", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 611 | "../rtc_base:rtc_base", |
| 612 | "../rtc_base:rtc_base_approved", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 613 | "../system_wrappers:field_trial_default", |
| 614 | "../system_wrappers:metrics_default", |
Ilya Nikolaevskiy | 2ffe3e8 | 2018-01-17 19:57:24 +0000 | [diff] [blame] | 615 | "../system_wrappers:runtime_enabled_features_default", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 616 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 617 | if (!build_with_chromium && is_clang) { |
| 618 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 619 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 620 | } |
| 621 | } |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 622 | rtc_executable("turnserver") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 623 | testonly = true |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 624 | sources = [ |
| 625 | "turnserver/turnserver_main.cc", |
| 626 | ] |
| 627 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 628 | "../p2p:rtc_p2p", |
| 629 | "../pc:rtc_pc", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 630 | "../rtc_base:rtc_base", |
| 631 | "../rtc_base:rtc_base_approved", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 632 | "../system_wrappers:field_trial_default", |
| 633 | "../system_wrappers:metrics_default", |
Ilya Nikolaevskiy | 2ffe3e8 | 2018-01-17 19:57:24 +0000 | [diff] [blame] | 634 | "../system_wrappers:runtime_enabled_features_default", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 635 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 636 | if (!build_with_chromium && is_clang) { |
| 637 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 638 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 639 | } |
| 640 | } |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 641 | rtc_executable("stunserver") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 642 | testonly = true |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 643 | sources = [ |
| 644 | "stunserver/stunserver_main.cc", |
| 645 | ] |
| 646 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 647 | "../p2p:rtc_p2p", |
| 648 | "../pc:rtc_pc", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 649 | "../rtc_base:rtc_base", |
| 650 | "../rtc_base:rtc_base_approved", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 651 | "../system_wrappers:field_trial_default", |
| 652 | "../system_wrappers:metrics_default", |
Ilya Nikolaevskiy | 2ffe3e8 | 2018-01-17 19:57:24 +0000 | [diff] [blame] | 653 | "../system_wrappers:runtime_enabled_features_default", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 654 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 655 | if (!build_with_chromium && is_clang) { |
| 656 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 657 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 658 | } |
| 659 | } |
| 660 | } |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 661 | |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 662 | if (is_win || is_android) { |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 663 | rtc_shared_library("webrtc_unity_plugin") { |
| 664 | testonly = true |
| 665 | sources = [ |
| 666 | "unityplugin/simple_peer_connection.cc", |
| 667 | "unityplugin/simple_peer_connection.h", |
| 668 | "unityplugin/unity_plugin_apis.cc", |
| 669 | "unityplugin/unity_plugin_apis.h", |
gyzhou | b38f386 | 2017-07-25 16:04:31 -0700 | [diff] [blame] | 670 | "unityplugin/video_observer.cc", |
| 671 | "unityplugin/video_observer.h", |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 672 | ] |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 673 | |
| 674 | if (is_android) { |
| 675 | sources += [ |
| 676 | "unityplugin/classreferenceholder.cc", |
| 677 | "unityplugin/classreferenceholder.h", |
| 678 | "unityplugin/jni_onload.cc", |
| 679 | ] |
Qiang Chen | 43fb912 | 2017-12-20 10:47:36 -0800 | [diff] [blame] | 680 | suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 681 | } |
| 682 | |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 683 | if (!build_with_chromium && is_clang) { |
| 684 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 685 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 686 | } |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 687 | if (is_win) { |
| 688 | cflags = [ "/wd4245" ] |
| 689 | configs += [ |
| 690 | "//build/config/win:windowed", |
| 691 | ":peerconnection_client_warnings_config", |
| 692 | ] |
| 693 | } |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 694 | deps = [ |
Mirko Bonadei | 34814c7 | 2018-01-11 10:13:56 +0100 | [diff] [blame] | 695 | "../api:libjingle_peerconnection_api", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 696 | "../api:libjingle_peerconnection_test_api", |
| 697 | "../api:video_frame_api", |
Qiang Chen | 51e2046 | 2017-12-05 11:11:21 -0800 | [diff] [blame] | 698 | "../api/audio_codecs:builtin_audio_decoder_factory", |
| 699 | "../api/audio_codecs:builtin_audio_encoder_factory", |
Mirko Bonadei | 75baa49 | 2018-01-11 17:07:30 +0100 | [diff] [blame] | 700 | "../media:rtc_audio_video", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 701 | "../media:rtc_internal_video_codecs", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 702 | "../media:rtc_media", |
| 703 | "../media:rtc_media_base", |
Qiang Chen | 43fb912 | 2017-12-20 10:47:36 -0800 | [diff] [blame] | 704 | "../modules/audio_device:audio_device", |
| 705 | "../modules/audio_processing:audio_processing", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 706 | "../modules/video_capture:video_capture_module", |
| 707 | "../pc:libjingle_peerconnection", |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 708 | "../rtc_base:rtc_base", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 709 | "../system_wrappers:field_trial_default", |
| 710 | "../system_wrappers:metrics_default", |
Ilya Nikolaevskiy | 2ffe3e8 | 2018-01-17 19:57:24 +0000 | [diff] [blame] | 711 | "../system_wrappers:runtime_enabled_features_default", |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 712 | ] |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 713 | if (is_android) { |
| 714 | deps += [ "../sdk/android:libjingle_peerconnection_jni" ] |
| 715 | } |
| 716 | } |
| 717 | } |
| 718 | |
| 719 | if (is_android) { |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 720 | rtc_android_library("webrtc_unity_java") { |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 721 | java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ] |
| 722 | deps = [ |
| 723 | "../rtc_base:base_java", |
| 724 | "../sdk/android:libjingle_peerconnection_java", |
| 725 | ] |
| 726 | } |
| 727 | |
| 728 | dist_jar("libwebrtc_unity") { |
| 729 | _target_dir_name = get_label_info(":$target_name", "dir") |
| 730 | output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar" |
| 731 | direct_deps_only = true |
| 732 | use_interface_jars = false |
Oleh Prypin | 1e53f8a | 2017-12-21 22:06:21 +0100 | [diff] [blame] | 733 | use_unprocessed_jars = true |
Oleh Prypin | 86021d9 | 2017-09-24 22:29:06 +0200 | [diff] [blame] | 734 | requires_android = true |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 735 | deps = [ |
| 736 | ":webrtc_unity_java", |
| 737 | "../modules/audio_device:audio_device_java", |
| 738 | "../rtc_base:base_java", |
| 739 | "../sdk/android:libjingle_peerconnection_java", |
| 740 | "../sdk/android:libjingle_peerconnection_metrics_default_java", |
| 741 | ] |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 742 | } |
| 743 | } |
| 744 | |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 745 | if (!build_with_chromium) { |
| 746 | # Doesn't build within Chrome on Win. |
| 747 | rtc_executable("stun_prober") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 748 | testonly = true |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 749 | sources = [ |
| 750 | "stunprober/main.cc", |
| 751 | ] |
| 752 | |
| 753 | if (!build_with_chromium && is_clang) { |
| 754 | # Suppress warnings from Chrome's Clang plugins. |
| 755 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 756 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 757 | } |
| 758 | |
| 759 | deps = [ |
| 760 | "../p2p:libstunprober", |
| 761 | "../p2p:rtc_p2p", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 762 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 763 | "../rtc_base:rtc_base", |
| 764 | "../rtc_base:rtc_base_approved", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 765 | "../rtc_base:stringutils", |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 766 | "../system_wrappers:field_trial_default", |
| 767 | ] |
| 768 | } |
| 769 | } |