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", |
Sami Kalliomäki | d54f5f5 | 2018-08-03 13:23:05 +0200 | [diff] [blame] | 28 | ":AppRTCMobile_test_apk", |
George Zhou | 2770c3d | 2018-03-07 09:58:54 -0800 | [diff] [blame] | 29 | ":libwebrtc_unity", |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 30 | ] |
Sami Kalliomäki | 3e77afd | 2018-03-08 16:43:16 +0100 | [diff] [blame] | 31 | |
| 32 | # TODO(sakal): We include some code from the tests. Remove this dependency |
| 33 | # and remove this if-clause. |
| 34 | if (rtc_include_tests) { |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 35 | deps += [ "androidnativeapi" ] |
Sami Kalliomäki | 3e77afd | 2018-03-08 16:43:16 +0100 | [diff] [blame] | 36 | } |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 37 | } |
| 38 | |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 39 | if (!build_with_chromium) { |
Mirko Bonadei | 1a339c3 | 2017-12-14 13:06:10 +0100 | [diff] [blame] | 40 | deps += [ ":stun_prober" ] |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 41 | } |
| 42 | |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 43 | if (is_ios || (is_mac && target_cpu != "x86")) { |
Mirko Bonadei | 1a339c3 | 2017-12-14 13:06:10 +0100 | [diff] [blame] | 44 | deps += [ ":AppRTCMobile" ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 45 | } |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 46 | |
| 47 | if (is_linux || is_win) { |
Mirko Bonadei | 1a339c3 | 2017-12-14 13:06:10 +0100 | [diff] [blame] | 48 | deps += [ |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 49 | ":peerconnection_server", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 50 | ":stunserver", |
| 51 | ":turnserver", |
| 52 | ] |
Robin Raymond | ce1b140 | 2018-11-22 20:10:11 -0500 | [diff] [blame] | 53 | if (current_os != "winuwp") { |
| 54 | deps += [ ":peerconnection_client" ] |
| 55 | } |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 56 | } |
George Zhou | 2770c3d | 2018-03-07 09:58:54 -0800 | [diff] [blame] | 57 | |
| 58 | if (is_android || is_win) { |
| 59 | deps += [ ":webrtc_unity_plugin" ] |
| 60 | } |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 61 | } |
| 62 | |
Mirko Bonadei | 86d053c | 2019-10-17 21:32:04 +0200 | [diff] [blame] | 63 | rtc_library("read_auth_file") { |
Niels Möller | 9862c2e | 2018-10-30 12:20:03 +0100 | [diff] [blame] | 64 | testonly = true |
| 65 | sources = [ |
| 66 | "turnserver/read_auth_file.cc", |
| 67 | "turnserver/read_auth_file.h", |
| 68 | ] |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 69 | deps = [ "../rtc_base" ] |
Niels Möller | 9862c2e | 2018-10-30 12:20:03 +0100 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | if (rtc_include_tests) { |
| 73 | rtc_test("examples_unittests") { |
| 74 | testonly = true |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 75 | sources = [ "turnserver/read_auth_file_unittest.cc" ] |
Niels Möller | 9862c2e | 2018-10-30 12:20:03 +0100 | [diff] [blame] | 76 | deps = [ |
| 77 | ":read_auth_file", |
| 78 | "../test:test_main", |
| 79 | "//test:test_support", |
| 80 | "//testing/gtest", |
| 81 | ] |
| 82 | } |
| 83 | } |
| 84 | |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 85 | if (is_android) { |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 86 | rtc_android_apk("AppRTCMobile") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 87 | testonly = true |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 88 | apk_name = "AppRTCMobile" |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 89 | android_manifest = "androidapp/AndroidManifest.xml" |
Jeremy Leconte | b19cfee | 2020-06-25 22:57:49 +0200 | [diff] [blame] | 90 | min_sdk_version = 21 |
Oleh Prypin | 4cbb4ef | 2019-06-18 17:09:51 +0200 | [diff] [blame] | 91 | target_sdk_version = 29 |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 92 | |
| 93 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 94 | ":AppRTCMobile_javalib", |
| 95 | ":AppRTCMobile_resources", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 96 | "../rtc_base:base_java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 97 | ] |
| 98 | |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 99 | shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 100 | } |
| 101 | |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 102 | rtc_android_library("AppRTCMobile_javalib") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 103 | testonly = true |
Courtney Edwards | 35c87b6 | 2020-05-19 13:44:42 +0200 | [diff] [blame] | 104 | android_manifest = "androidapp/AndroidManifest.xml" |
sakal | 07a050f | 2017-02-13 05:58:27 -0800 | [diff] [blame] | 105 | |
Natalie Chouinard | 65bbcab | 2019-12-23 14:02:25 -0800 | [diff] [blame] | 106 | sources = [ |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 107 | "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java", |
henrika | c3c2f31 | 2016-12-14 07:36:56 -0800 | [diff] [blame] | 108 | "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 109 | "androidapp/src/org/appspot/apprtc/AppRTCClient.java", |
| 110 | "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java", |
| 111 | "androidapp/src/org/appspot/apprtc/CallActivity.java", |
| 112 | "androidapp/src/org/appspot/apprtc/CallFragment.java", |
| 113 | "androidapp/src/org/appspot/apprtc/CaptureQualityController.java", |
| 114 | "androidapp/src/org/appspot/apprtc/ConnectActivity.java", |
| 115 | "androidapp/src/org/appspot/apprtc/CpuMonitor.java", |
| 116 | "androidapp/src/org/appspot/apprtc/DirectRTCClient.java", |
| 117 | "androidapp/src/org/appspot/apprtc/HudFragment.java", |
| 118 | "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java", |
Natalie Chouinard | 65bbcab | 2019-12-23 14:02:25 -0800 | [diff] [blame] | 119 | "androidapp/src/org/appspot/apprtc/RecordedAudioToFileController.java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 120 | "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java", |
Qingsi Wang | a4e72b7 | 2018-02-12 10:34:18 -0800 | [diff] [blame] | 121 | "androidapp/src/org/appspot/apprtc/RtcEventLog.java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 122 | "androidapp/src/org/appspot/apprtc/SettingsActivity.java", |
| 123 | "androidapp/src/org/appspot/apprtc/SettingsFragment.java", |
| 124 | "androidapp/src/org/appspot/apprtc/TCPChannelClient.java", |
| 125 | "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java", |
| 126 | "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java", |
| 127 | "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java", |
| 128 | "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java", |
| 129 | "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 130 | ] |
| 131 | |
| 132 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 133 | ":AppRTCMobile_resources", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 134 | "../rtc_base:base_java", |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 135 | "../sdk/android:audio_api_java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 136 | "../sdk/android:base_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 137 | "../sdk/android:camera_java", |
Anders Carlsson | 1e06d88 | 2018-07-10 09:33:30 +0200 | [diff] [blame] | 138 | "../sdk/android:default_video_codec_factory_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 139 | "../sdk/android:filevideo_java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 140 | "../sdk/android:hwcodecs_java", |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 141 | "../sdk/android:java_audio_device_module_java", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 142 | "../sdk/android:libjingle_peerconnection_java", |
| 143 | "../sdk/android:libjingle_peerconnection_metrics_default_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 144 | "../sdk/android:peerconnection_java", |
| 145 | "../sdk/android:screencapturer_java", |
| 146 | "../sdk/android:surfaceviewrenderer_java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 147 | "../sdk/android:swcodecs_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 148 | "../sdk/android:video_api_java", |
Sami Kalliomäki | 903bd41 | 2018-07-24 10:53:28 +0200 | [diff] [blame] | 149 | "../sdk/android:video_java", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 150 | "androidapp/third_party/autobanh:autobanh_java", |
Peter Wen | 7bc331f | 2019-03-06 09:18:57 -0500 | [diff] [blame] | 151 | "//third_party/android_deps:com_android_support_support_annotations_java", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 152 | ] |
| 153 | } |
| 154 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 155 | android_resources("AppRTCMobile_resources") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 156 | testonly = true |
Andrew Grieve | d4262df | 2020-03-25 12:59:50 -0400 | [diff] [blame] | 157 | sources = [ |
| 158 | "androidapp/res/drawable-hdpi/disconnect.png", |
| 159 | "androidapp/res/drawable-hdpi/ic_action_full_screen.png", |
| 160 | "androidapp/res/drawable-hdpi/ic_action_return_from_full_screen.png", |
| 161 | "androidapp/res/drawable-hdpi/ic_launcher.png", |
| 162 | "androidapp/res/drawable-hdpi/ic_loopback_call.png", |
| 163 | "androidapp/res/drawable-ldpi/disconnect.png", |
| 164 | "androidapp/res/drawable-ldpi/ic_action_full_screen.png", |
| 165 | "androidapp/res/drawable-ldpi/ic_action_return_from_full_screen.png", |
| 166 | "androidapp/res/drawable-ldpi/ic_launcher.png", |
| 167 | "androidapp/res/drawable-ldpi/ic_loopback_call.png", |
| 168 | "androidapp/res/drawable-mdpi/disconnect.png", |
| 169 | "androidapp/res/drawable-mdpi/ic_action_full_screen.png", |
| 170 | "androidapp/res/drawable-mdpi/ic_action_return_from_full_screen.png", |
| 171 | "androidapp/res/drawable-mdpi/ic_launcher.png", |
| 172 | "androidapp/res/drawable-mdpi/ic_loopback_call.png", |
| 173 | "androidapp/res/drawable-xhdpi/disconnect.png", |
| 174 | "androidapp/res/drawable-xhdpi/ic_action_full_screen.png", |
| 175 | "androidapp/res/drawable-xhdpi/ic_action_return_from_full_screen.png", |
| 176 | "androidapp/res/drawable-xhdpi/ic_launcher.png", |
| 177 | "androidapp/res/drawable-xhdpi/ic_loopback_call.png", |
| 178 | "androidapp/res/layout/activity_call.xml", |
| 179 | "androidapp/res/layout/activity_connect.xml", |
| 180 | "androidapp/res/layout/fragment_call.xml", |
| 181 | "androidapp/res/layout/fragment_hud.xml", |
| 182 | "androidapp/res/menu/connect_menu.xml", |
Andrew Grieve | d4262df | 2020-03-25 12:59:50 -0400 | [diff] [blame] | 183 | "androidapp/res/values-v17/styles.xml", |
| 184 | "androidapp/res/values-v21/styles.xml", |
Artem Titov | a4dfe24 | 2020-06-03 16:42:57 +0200 | [diff] [blame] | 185 | "androidapp/res/values/arrays.xml", |
| 186 | "androidapp/res/values/strings.xml", |
Andrew Grieve | d4262df | 2020-03-25 12:59:50 -0400 | [diff] [blame] | 187 | "androidapp/res/xml/preferences.xml", |
| 188 | ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 189 | custom_package = "org.appspot.apprtc" |
Andrew Grieve | d4262df | 2020-03-25 12:59:50 -0400 | [diff] [blame] | 190 | |
| 191 | # Needed for Bazel converter. |
| 192 | resource_dirs = [ "androidapp/res" ] |
| 193 | assert(resource_dirs != []) # Mark as used. |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 194 | } |
| 195 | |
Sami Kalliomäki | d54f5f5 | 2018-08-03 13:23:05 +0200 | [diff] [blame] | 196 | rtc_instrumentation_test_apk("AppRTCMobile_test_apk") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 197 | apk_name = "AppRTCMobileTest" |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 198 | android_manifest = "androidtests/AndroidManifest.xml" |
Jeremy Leconte | b19cfee | 2020-06-25 22:57:49 +0200 | [diff] [blame] | 199 | min_sdk_version = 21 |
Oleh Prypin | 4cbb4ef | 2019-06-18 17:09:51 +0200 | [diff] [blame] | 200 | target_sdk_version = 21 |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 201 | |
Natalie Chouinard | 65bbcab | 2019-12-23 14:02:25 -0800 | [diff] [blame] | 202 | sources = [ |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 203 | "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java", |
| 204 | ] |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 205 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 206 | apk_under_test = ":AppRTCMobile" |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 207 | |
| 208 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 209 | ":AppRTCMobile_javalib", |
Artem Titov | a4dfe24 | 2020-06-03 16:42:57 +0200 | [diff] [blame] | 210 | "../sdk/android:camera_java", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 211 | "../sdk/android:libjingle_peerconnection_java", |
Artem Titov | a4dfe24 | 2020-06-03 16:42:57 +0200 | [diff] [blame] | 212 | "../sdk/android:peerconnection_java", |
| 213 | "../sdk/android:video_api_java", |
Sami Kalliomäki | 903bd41 | 2018-07-24 10:53:28 +0200 | [diff] [blame] | 214 | "../sdk/android:video_java", |
sakal | cb79d51 | 2017-01-11 06:21:26 -0800 | [diff] [blame] | 215 | "//third_party/android_support_test_runner:runner_java", |
| 216 | "//third_party/junit", |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 217 | ] |
| 218 | } |
Sami Kalliomaki | 9c0c75b | 2016-06-29 14:55:00 +0200 | [diff] [blame] | 219 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 220 | |
| 221 | if (is_ios || (is_mac && target_cpu != "x86")) { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 222 | config("apprtc_common_config") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 223 | include_dirs = [ "objc/AppRTCMobile/common" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 224 | } |
| 225 | |
Mirko Bonadei | 86d053c | 2019-10-17 21:32:04 +0200 | [diff] [blame] | 226 | rtc_library("apprtc_common") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 227 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 228 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 229 | "objc/AppRTCMobile/common/ARDUtilities.h", |
| 230 | "objc/AppRTCMobile/common/ARDUtilities.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 231 | ] |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 232 | public_configs = [ ":apprtc_common_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 233 | |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 234 | if (is_ios) { |
Mirko Bonadei | cbaaaed | 2018-02-19 15:14:04 +0100 | [diff] [blame] | 235 | # iOS must use WebRTC.framework which is dynamically linked. |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 236 | deps = [ "../sdk:framework_objc+link" ] |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 237 | } else { |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 238 | deps = [ "../sdk:mac_framework_objc+link" ] |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 239 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 240 | } |
| 241 | |
| 242 | config("apprtc_signaling_config") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 243 | include_dirs = [ "objc/AppRTCMobile" ] |
Mirko Bonadei | 89327ff | 2019-07-30 11:38:08 +0200 | [diff] [blame] | 244 | cflags_objc = [ |
| 245 | # TODO(bugs.webrtc.org/10837): Remove this when usage of |
| 246 | # archivedDataWithRootObject will be removed. |
| 247 | "-Wno-unguarded-availability", |
| 248 | ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 249 | } |
| 250 | |
Mirko Bonadei | 86d053c | 2019-10-17 21:32:04 +0200 | [diff] [blame] | 251 | rtc_library("apprtc_signaling") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 252 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 253 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 254 | "objc/AppRTCMobile/ARDAppClient+Internal.h", |
| 255 | "objc/AppRTCMobile/ARDAppClient.h", |
| 256 | "objc/AppRTCMobile/ARDAppClient.m", |
| 257 | "objc/AppRTCMobile/ARDAppEngineClient.h", |
| 258 | "objc/AppRTCMobile/ARDAppEngineClient.m", |
| 259 | "objc/AppRTCMobile/ARDBitrateTracker.h", |
| 260 | "objc/AppRTCMobile/ARDBitrateTracker.m", |
sakal | c522e75 | 2017-04-05 12:17:48 -0700 | [diff] [blame] | 261 | "objc/AppRTCMobile/ARDCaptureController.h", |
| 262 | "objc/AppRTCMobile/ARDCaptureController.m", |
Anders Carlsson | 358f2e0 | 2018-06-04 10:24:37 +0200 | [diff] [blame] | 263 | "objc/AppRTCMobile/ARDExternalSampleCapturer.h", |
| 264 | "objc/AppRTCMobile/ARDExternalSampleCapturer.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 265 | "objc/AppRTCMobile/ARDJoinResponse+Internal.h", |
| 266 | "objc/AppRTCMobile/ARDJoinResponse.h", |
| 267 | "objc/AppRTCMobile/ARDJoinResponse.m", |
| 268 | "objc/AppRTCMobile/ARDMessageResponse+Internal.h", |
| 269 | "objc/AppRTCMobile/ARDMessageResponse.h", |
| 270 | "objc/AppRTCMobile/ARDMessageResponse.m", |
| 271 | "objc/AppRTCMobile/ARDRoomServerClient.h", |
sakal | c4adacf | 2017-03-28 01:22:48 -0700 | [diff] [blame] | 272 | "objc/AppRTCMobile/ARDSettingsModel+Private.h", |
| 273 | "objc/AppRTCMobile/ARDSettingsModel.h", |
| 274 | "objc/AppRTCMobile/ARDSettingsModel.m", |
| 275 | "objc/AppRTCMobile/ARDSettingsStore.h", |
| 276 | "objc/AppRTCMobile/ARDSettingsStore.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 277 | "objc/AppRTCMobile/ARDSignalingChannel.h", |
| 278 | "objc/AppRTCMobile/ARDSignalingMessage.h", |
| 279 | "objc/AppRTCMobile/ARDSignalingMessage.m", |
| 280 | "objc/AppRTCMobile/ARDStatsBuilder.h", |
| 281 | "objc/AppRTCMobile/ARDStatsBuilder.m", |
kthelgason | cc882af | 2017-01-13 05:59:46 -0800 | [diff] [blame] | 282 | "objc/AppRTCMobile/ARDTURNClient+Internal.h", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 283 | "objc/AppRTCMobile/ARDTURNClient.h", |
kthelgason | cc882af | 2017-01-13 05:59:46 -0800 | [diff] [blame] | 284 | "objc/AppRTCMobile/ARDTURNClient.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 285 | "objc/AppRTCMobile/ARDWebSocketChannel.h", |
| 286 | "objc/AppRTCMobile/ARDWebSocketChannel.m", |
| 287 | "objc/AppRTCMobile/RTCIceCandidate+JSON.h", |
| 288 | "objc/AppRTCMobile/RTCIceCandidate+JSON.m", |
| 289 | "objc/AppRTCMobile/RTCIceServer+JSON.h", |
| 290 | "objc/AppRTCMobile/RTCIceServer+JSON.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 291 | "objc/AppRTCMobile/RTCSessionDescription+JSON.h", |
| 292 | "objc/AppRTCMobile/RTCSessionDescription+JSON.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 293 | ] |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 294 | public_configs = [ ":apprtc_signaling_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 295 | deps = [ |
| 296 | ":apprtc_common", |
| 297 | ":socketrocket", |
| 298 | ] |
Kári Tristan Helgason | 8a1e35c | 2019-03-07 10:44:26 +0100 | [diff] [blame] | 299 | |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 300 | if (is_ios) { |
Mirko Bonadei | cbaaaed | 2018-02-19 15:14:04 +0100 | [diff] [blame] | 301 | # iOS must use WebRTC.framework which is dynamically linked. |
Mirko Bonadei | 1a339c3 | 2017-12-14 13:06:10 +0100 | [diff] [blame] | 302 | deps += [ |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 303 | "../sdk:framework_objc+link", |
| 304 | "../sdk:ios_framework_bundle", |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 305 | ] |
Mirko Bonadei | 1a339c3 | 2017-12-14 13:06:10 +0100 | [diff] [blame] | 306 | } else { |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 307 | deps += [ "../sdk:mac_framework_objc+link" ] |
Kári Tristan Helgason | 946923a | 2017-06-02 14:05:56 +0200 | [diff] [blame] | 308 | } |
Sylvain Defresne | c7f0dff | 2020-07-03 10:19:30 +0200 | [diff] [blame] | 309 | frameworks = [ |
Kári Tristan Helgason | 8a1e35c | 2019-03-07 10:44:26 +0100 | [diff] [blame] | 310 | "CoreMedia.framework", |
| 311 | "QuartzCore.framework", |
| 312 | ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 313 | } |
| 314 | |
| 315 | if (is_ios) { |
Mirko Bonadei | 86d053c | 2019-10-17 21:32:04 +0200 | [diff] [blame] | 316 | rtc_library("AppRTCMobile_lib") { |
Mirko Bonadei | cbaaaed | 2018-02-19 15:14:04 +0100 | [diff] [blame] | 317 | # iOS must use WebRTC.framework which is dynamically linked. |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 318 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 319 | sources = [ |
Patrik Höglund | 49acb1e | 2018-01-02 14:41:54 +0100 | [diff] [blame] | 320 | "objc/AppRTCMobile/ios/ARDAppDelegate.h", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 321 | "objc/AppRTCMobile/ios/ARDAppDelegate.m", |
Daniela | 012b56b | 2017-11-15 13:15:24 +0100 | [diff] [blame] | 322 | "objc/AppRTCMobile/ios/ARDFileCaptureController.h", |
| 323 | "objc/AppRTCMobile/ios/ARDFileCaptureController.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 324 | "objc/AppRTCMobile/ios/ARDMainView.h", |
| 325 | "objc/AppRTCMobile/ios/ARDMainView.m", |
| 326 | "objc/AppRTCMobile/ios/ARDMainViewController.h", |
| 327 | "objc/AppRTCMobile/ios/ARDMainViewController.m", |
denicija | d17d536 | 2016-11-02 02:56:09 -0700 | [diff] [blame] | 328 | "objc/AppRTCMobile/ios/ARDSettingsViewController.h", |
| 329 | "objc/AppRTCMobile/ios/ARDSettingsViewController.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 330 | "objc/AppRTCMobile/ios/ARDStatsView.h", |
| 331 | "objc/AppRTCMobile/ios/ARDStatsView.m", |
| 332 | "objc/AppRTCMobile/ios/ARDVideoCallView.h", |
| 333 | "objc/AppRTCMobile/ios/ARDVideoCallView.m", |
| 334 | "objc/AppRTCMobile/ios/ARDVideoCallViewController.h", |
| 335 | "objc/AppRTCMobile/ios/ARDVideoCallViewController.m", |
Anders Carlsson | 6bf43d2 | 2017-10-16 13:51:43 +0200 | [diff] [blame] | 336 | "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h", |
| 337 | "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 338 | "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h", |
| 339 | "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m", |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 340 | ] |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 341 | |
Anders Carlsson | 96fccfe | 2019-02-21 16:11:40 +0100 | [diff] [blame] | 342 | configs += [ "..:common_objc" ] |
| 343 | |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 344 | deps = [ |
| 345 | ":apprtc_common", |
| 346 | ":apprtc_signaling", |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 347 | "../sdk:framework_objc+link", |
| 348 | "../sdk:ios_framework_bundle", |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 349 | ] |
Kári Tristan Helgason | 8a1e35c | 2019-03-07 10:44:26 +0100 | [diff] [blame] | 350 | |
Sylvain Defresne | c7f0dff | 2020-07-03 10:19:30 +0200 | [diff] [blame] | 351 | frameworks = [ "AVFoundation.framework" ] |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 352 | } |
| 353 | |
| 354 | ios_app_bundle("AppRTCMobile") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 355 | testonly = true |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 356 | sources = [ "objc/AppRTCMobile/ios/main.m" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 357 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 358 | info_plist = "objc/AppRTCMobile/ios/Info.plist" |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 359 | |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 360 | configs += [ "..:common_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 361 | public_configs = [ "..:common_inherited_config" ] |
| 362 | |
| 363 | deps = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 364 | ":AppRTCMobile_ios_bundle_data", |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 365 | ":AppRTCMobile_lib", |
Mirko Bonadei | 1a339c3 | 2017-12-14 13:06:10 +0100 | [diff] [blame] | 366 | "../sdk:framework_objc", |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 367 | "../sdk:ios_framework_bundle", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 368 | ] |
| 369 | |
Anders Carlsson | 358f2e0 | 2018-06-04 10:24:37 +0200 | [diff] [blame] | 370 | if (rtc_apprtcmobile_broadcast_extension) { |
| 371 | deps += [ |
| 372 | ":AppRTCMobileBroadcastSetupUI_extension_bundle", |
| 373 | ":AppRTCMobileBroadcastUpload_extension_bundle", |
| 374 | ] |
| 375 | } |
| 376 | |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 377 | if (target_cpu == "x86") { |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 378 | deps += [ "//testing/iossim" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 379 | } |
| 380 | } |
| 381 | |
Anders Carlsson | 358f2e0 | 2018-06-04 10:24:37 +0200 | [diff] [blame] | 382 | if (rtc_apprtcmobile_broadcast_extension) { |
| 383 | bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") { |
| 384 | testonly = true |
Artem Titov | a4dfe24 | 2020-06-03 16:42:57 +0200 | [diff] [blame] | 385 | public_deps = [ # no-presubmit-check TODO(webrtc:8603) |
| 386 | ":AppRTCMobileBroadcastUpload", # prevent code format |
| 387 | ] |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 388 | sources = [ "$root_out_dir/AppRTCMobileBroadcastUpload.appex" ] |
| 389 | outputs = [ "{{bundle_contents_dir}}/Plugins/{{source_file_part}}" ] |
Anders Carlsson | 358f2e0 | 2018-06-04 10:24:37 +0200 | [diff] [blame] | 390 | } |
| 391 | |
| 392 | bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") { |
| 393 | testonly = true |
Artem Titov | a4dfe24 | 2020-06-03 16:42:57 +0200 | [diff] [blame] | 394 | public_deps = [ # no-presubmit-check TODO(webrtc:8603) |
| 395 | ":AppRTCMobileBroadcastSetupUI", # prevent code format |
| 396 | ] |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 397 | sources = [ "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex" ] |
| 398 | outputs = [ "{{bundle_contents_dir}}/Plugins/{{source_file_part}}" ] |
Anders Carlsson | 358f2e0 | 2018-06-04 10:24:37 +0200 | [diff] [blame] | 399 | } |
| 400 | |
Mirko Bonadei | 86d053c | 2019-10-17 21:32:04 +0200 | [diff] [blame] | 401 | rtc_library("AppRTCMobileBroadcastUpload_lib") { |
Anders Carlsson | 358f2e0 | 2018-06-04 10:24:37 +0200 | [diff] [blame] | 402 | testonly = true |
| 403 | sources = [ |
| 404 | "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h", |
| 405 | "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.m", |
| 406 | ] |
| 407 | |
| 408 | deps = [ |
Anders Carlsson | 358f2e0 | 2018-06-04 10:24:37 +0200 | [diff] [blame] | 409 | ":apprtc_signaling", |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 410 | "../sdk:framework_objc+link", |
| 411 | "../sdk:ios_framework_bundle", |
Anders Carlsson | 358f2e0 | 2018-06-04 10:24:37 +0200 | [diff] [blame] | 412 | ] |
| 413 | |
Sylvain Defresne | c7f0dff | 2020-07-03 10:19:30 +0200 | [diff] [blame] | 414 | frameworks = [ "ReplayKit.framework" ] |
Anders Carlsson | 358f2e0 | 2018-06-04 10:24:37 +0200 | [diff] [blame] | 415 | } |
| 416 | |
| 417 | ios_appex_bundle("AppRTCMobileBroadcastUpload") { |
| 418 | testonly = true |
| 419 | configs += [ "..:common_config" ] |
| 420 | public_configs = [ "..:common_inherited_config" ] |
| 421 | |
| 422 | info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastUploadInfo.plist" |
| 423 | |
| 424 | deps = [ |
| 425 | ":AppRTCMobileBroadcastUpload_lib", |
| 426 | "../sdk:framework_objc", |
| 427 | ] |
| 428 | } |
| 429 | |
| 430 | ios_appex_bundle("AppRTCMobileBroadcastSetupUI") { |
| 431 | sources = [ |
| 432 | "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h", |
| 433 | "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.m", |
| 434 | ] |
| 435 | |
| 436 | info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastSetupUIInfo.plist" |
| 437 | |
Sylvain Defresne | c7f0dff | 2020-07-03 10:19:30 +0200 | [diff] [blame] | 438 | frameworks = [ "ReplayKit.framework" ] |
Anders Carlsson | 358f2e0 | 2018-06-04 10:24:37 +0200 | [diff] [blame] | 439 | |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 440 | deps = [ ":AppRTCMobile_ios_bundle_data" ] |
Anders Carlsson | 358f2e0 | 2018-06-04 10:24:37 +0200 | [diff] [blame] | 441 | } |
| 442 | } |
| 443 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 444 | bundle_data("AppRTCMobile_ios_bundle_data") { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 445 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 446 | "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf", |
Daniela | 012b56b | 2017-11-15 13:15:24 +0100 | [diff] [blame] | 447 | |
| 448 | # Sample video taken from https://media.xiph.org/video/derf/ |
| 449 | "objc/AppRTCMobile/ios/resources/foreman.mp4", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 450 | "objc/AppRTCMobile/ios/resources/iPhone5@2x.png", |
| 451 | "objc/AppRTCMobile/ios/resources/iPhone6@2x.png", |
| 452 | "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png", |
| 453 | "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png", |
| 454 | "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png", |
| 455 | "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png", |
| 456 | "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png", |
denicija | 6d6762c | 2016-10-28 04:53:16 -0700 | [diff] [blame] | 457 | "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png", |
| 458 | "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png", |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 459 | "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png", |
| 460 | "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png", |
| 461 | "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png", |
| 462 | "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png", |
| 463 | "objc/AppRTCMobile/ios/resources/mozart.mp3", |
andersc | b5ed905 | 2017-08-15 04:07:12 -0700 | [diff] [blame] | 464 | "objc/Icon-120.png", |
| 465 | "objc/Icon-180.png", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 466 | "objc/Icon.png", |
| 467 | ] |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 468 | outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 469 | } |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 470 | |
Mirko Bonadei | 86d053c | 2019-10-17 21:32:04 +0200 | [diff] [blame] | 471 | rtc_library("ObjCNativeAPIDemo_lib") { |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 472 | testonly = true |
| 473 | sources = [ |
| 474 | "objcnativeapi/objc/NADAppDelegate.h", |
| 475 | "objcnativeapi/objc/NADAppDelegate.m", |
| 476 | "objcnativeapi/objc/NADViewController.h", |
| 477 | "objcnativeapi/objc/NADViewController.mm", |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 478 | "objcnativeapi/objc/objc_call_client.h", |
| 479 | "objcnativeapi/objc/objc_call_client.mm", |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 480 | ] |
| 481 | |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 482 | deps = [ |
| 483 | "../api:libjingle_peerconnection_api", |
Mirko Bonadei | d970807 | 2019-01-25 20:26:48 +0100 | [diff] [blame] | 484 | "../api:scoped_refptr", |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 485 | "../api/audio_codecs:builtin_audio_decoder_factory", |
| 486 | "../api/audio_codecs:builtin_audio_encoder_factory", |
Danil Chapovalov | 4ba04b7 | 2019-06-26 15:49:47 +0200 | [diff] [blame] | 487 | "../api/rtc_event_log:rtc_event_log_factory", |
Danil Chapovalov | aaa1143 | 2019-05-17 13:20:14 +0200 | [diff] [blame] | 488 | "../api/task_queue:default_task_queue_factory", |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 489 | "../media:rtc_audio_video", |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 490 | "../modules/audio_processing", |
Alessio Bazzica | b768e88 | 2018-11-07 14:29:54 +0000 | [diff] [blame] | 491 | "../modules/audio_processing:api", |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 492 | "../pc:libjingle_peerconnection", |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 493 | "../rtc_base", |
Markus Handell | 06d034f | 2020-07-07 09:17:56 +0200 | [diff] [blame] | 494 | "../rtc_base/synchronization:mutex", |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 495 | "../sdk:base_objc", |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 496 | "../sdk:default_codec_factory_objc", |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 497 | "../sdk:helpers_objc", |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 498 | "../sdk:native_api", |
| 499 | "../sdk:ui_objc", |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 500 | "../sdk:videocapture_objc", |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 501 | "../sdk:videotoolbox_objc", |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 502 | ] |
| 503 | |
| 504 | if (current_cpu == "arm64") { |
| 505 | deps += [ "../sdk:metal_objc" ] |
| 506 | } |
| 507 | } |
| 508 | |
| 509 | ios_app_bundle("ObjCNativeAPIDemo") { |
| 510 | testonly = true |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 511 | sources = [ "objcnativeapi/objc/main.m" ] |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 512 | |
| 513 | info_plist = "objcnativeapi/Info.plist" |
| 514 | |
| 515 | configs += [ "..:common_config" ] |
| 516 | public_configs = [ "..:common_inherited_config" ] |
| 517 | |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 518 | deps = [ ":ObjCNativeAPIDemo_lib" ] |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 519 | |
| 520 | if (target_cpu == "x86") { |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 521 | deps += [ "//testing/iossim" ] |
Anders Carlsson | 7311918 | 2018-03-15 09:41:03 +0100 | [diff] [blame] | 522 | } |
| 523 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 524 | } |
| 525 | |
| 526 | if (is_mac) { |
Mirko Bonadei | 86d053c | 2019-10-17 21:32:04 +0200 | [diff] [blame] | 527 | rtc_library("AppRTCMobile_lib") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 528 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 529 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 530 | "objc/AppRTCMobile/mac/APPRTCAppDelegate.h", |
| 531 | "objc/AppRTCMobile/mac/APPRTCAppDelegate.m", |
| 532 | "objc/AppRTCMobile/mac/APPRTCViewController.h", |
| 533 | "objc/AppRTCMobile/mac/APPRTCViewController.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 534 | ] |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 535 | configs += [ "..:common_objc" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 536 | deps = [ |
| 537 | ":apprtc_common", |
| 538 | ":apprtc_signaling", |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 539 | "../sdk:mac_framework_objc+link", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 540 | ] |
| 541 | } |
| 542 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 543 | mac_app_bundle("AppRTCMobile") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 544 | testonly = true |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 545 | output_name = "AppRTCMobile" |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 546 | |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 547 | sources = [ "objc/AppRTCMobile/mac/main.m" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 548 | |
| 549 | public_configs = [ "..:common_inherited_config" ] |
| 550 | |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 551 | info_plist = "objc/AppRTCMobile/mac/Info.plist" |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 552 | |
Sylvain Defresne | c7f0dff | 2020-07-03 10:19:30 +0200 | [diff] [blame] | 553 | frameworks = [ "AppKit.framework" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 554 | |
Anders Carlsson | 24d8ec3 | 2018-12-10 14:04:12 +0100 | [diff] [blame] | 555 | ldflags = [ |
| 556 | "-rpath", |
| 557 | "@executable_path/../Frameworks", |
| 558 | ] |
| 559 | |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 560 | deps = [ |
denicija | 77bfd7c | 2016-11-15 00:41:26 -0800 | [diff] [blame] | 561 | ":AppRTCMobile_lib", |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 562 | "../sdk:mac_framework_bundle", |
| 563 | "../sdk:mac_framework_objc+link", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 564 | ] |
| 565 | } |
| 566 | } |
| 567 | |
| 568 | config("socketrocket_include_config") { |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 569 | include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 570 | } |
| 571 | |
| 572 | config("socketrocket_warning_config") { |
| 573 | # GN orders flags on a target before flags from configs. The default config |
| 574 | # adds these flags so to cancel them out they need to come from a config and |
| 575 | # cannot be on the target directly. |
| 576 | cflags = [ |
| 577 | "-Wno-deprecated-declarations", |
| 578 | "-Wno-nonnull", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 579 | "-Wno-semicolon-before-method-body", |
kthelgason | e47de1a | 2017-02-24 01:56:01 -0800 | [diff] [blame] | 580 | "-Wno-unused-variable", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 581 | ] |
| 582 | |
henrika | 27d8b61 | 2016-09-21 04:13:00 -0700 | [diff] [blame] | 583 | cflags_objc = [ |
| 584 | # Enabled for cflags_objc in build/config/compiler/BUILD.gn. |
| 585 | "-Wno-objc-missing-property-synthesis", |
henrika | 27d8b61 | 2016-09-21 04:13:00 -0700 | [diff] [blame] | 586 | ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 587 | } |
| 588 | |
Mirko Bonadei | 86d053c | 2019-10-17 21:32:04 +0200 | [diff] [blame] | 589 | rtc_library("socketrocket") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 590 | testonly = true |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 591 | sources = [ |
Magnus Jedvert | c1815cf | 2016-09-27 10:10:41 +0200 | [diff] [blame] | 592 | "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h", |
| 593 | "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 594 | ] |
kthelgason | c097710 | 2017-04-24 00:57:16 -0700 | [diff] [blame] | 595 | configs += [ ":socketrocket_warning_config" ] |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 596 | public_configs = [ ":socketrocket_include_config" ] |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 597 | |
Sylvain Defresne | c7f0dff | 2020-07-03 10:19:30 +0200 | [diff] [blame] | 598 | libs = [ "icucore" ] |
| 599 | frameworks = [ |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 600 | "CFNetwork.framework", |
Oleh Prypin | b3f78de | 2019-07-18 22:25:48 +0200 | [diff] [blame] | 601 | "Security.framework", |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 602 | ] |
| 603 | } |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 604 | |
| 605 | if (rtc_include_tests) { |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 606 | # TODO(kthelgason): compile xctests on mac when chromium supports it. |
| 607 | if (is_ios) { |
Mirko Bonadei | 86d053c | 2019-10-17 21:32:04 +0200 | [diff] [blame] | 608 | rtc_library("apprtcmobile_test_sources") { |
Mirko Bonadei | cbaaaed | 2018-02-19 15:14:04 +0100 | [diff] [blame] | 609 | # iOS must use WebRTC.framework which is dynamically linked. |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 610 | testonly = true |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 611 | include_dirs = [ |
| 612 | "objc/AppRTCMobile", |
| 613 | "objc/AppRTCMobile/ios", |
| 614 | ] |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 615 | sources = [ |
| 616 | "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm", |
Daniela | 012b56b | 2017-11-15 13:15:24 +0100 | [diff] [blame] | 617 | "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm", |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 618 | "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm", |
| 619 | ] |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 620 | deps = [ |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 621 | ":AppRTCMobile_lib", |
Mirko Bonadei | cbaaaed | 2018-02-19 15:14:04 +0100 | [diff] [blame] | 622 | ":apprtc_signaling", |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 623 | "../rtc_base", |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 624 | "../sdk:framework_objc+link", |
| 625 | "../sdk:ios_framework_bundle", |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 626 | "//build/config/ios:xctest", |
| 627 | "//third_party/ocmock", |
| 628 | ] |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 629 | } |
| 630 | |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 631 | rtc_ios_xctest_test("apprtcmobile_tests") { |
| 632 | info_plist = "objc/AppRTCMobile/ios/Info.plist" |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 633 | sources = [ "objc/AppRTCMobile/tests/main.mm" ] |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 634 | deps = [ |
Mirko Bonadei | cbaaaed | 2018-02-19 15:14:04 +0100 | [diff] [blame] | 635 | ":AppRTCMobile_lib", |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 636 | ":apprtcmobile_test_sources", |
Mirko Bonadei | 1a339c3 | 2017-12-14 13:06:10 +0100 | [diff] [blame] | 637 | "../sdk:framework_objc", |
Artem Titarenko | 34fc346 | 2018-11-06 12:29:29 +0100 | [diff] [blame] | 638 | "//test:test_support", |
kthelgason | 4065a57 | 2017-02-14 04:58:56 -0800 | [diff] [blame] | 639 | ] |
| 640 | ldflags = [ "-all_load" ] |
| 641 | } |
adam.fedor | bcc5d87 | 2016-11-07 14:53:28 -0800 | [diff] [blame] | 642 | } |
| 643 | } |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 644 | } |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 645 | |
| 646 | if (is_linux || is_win) { |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 647 | rtc_executable("peerconnection_client") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 648 | testonly = true |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 649 | sources = [ |
| 650 | "peerconnection/client/conductor.cc", |
| 651 | "peerconnection/client/conductor.h", |
| 652 | "peerconnection/client/defaults.cc", |
| 653 | "peerconnection/client/defaults.h", |
| 654 | "peerconnection/client/peer_connection_client.cc", |
| 655 | "peerconnection/client/peer_connection_client.h", |
| 656 | ] |
ehmaldonado | 7a2ce0b | 2016-09-05 01:35:44 -0700 | [diff] [blame] | 657 | |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 658 | deps = [ |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 659 | "../api:audio_options_api", |
Mirko Bonadei | 2ff3f49 | 2018-11-22 09:00:13 +0100 | [diff] [blame] | 660 | "../api:create_peerconnection_factory", |
Mirko Bonadei | 34814c7 | 2018-01-11 10:13:56 +0100 | [diff] [blame] | 661 | "../api:libjingle_peerconnection_api", |
Niels Möller | e942b14 | 2019-09-17 14:30:41 +0200 | [diff] [blame] | 662 | "../api:media_stream_interface", |
Mirko Bonadei | d970807 | 2019-01-25 20:26:48 +0100 | [diff] [blame] | 663 | "../api:scoped_refptr", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 664 | "../api/audio:audio_mixer_api", |
| 665 | "../api/audio_codecs:audio_codecs_api", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame] | 666 | "../api/video:video_frame_i420", |
Chen Xing | 5d24b16 | 2019-06-10 12:59:38 +0200 | [diff] [blame] | 667 | "../api/video:video_rtp_headers", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 668 | "../api/video_codecs:video_codecs_api", |
| 669 | "../media:rtc_media_base", |
| 670 | "../p2p:rtc_p2p", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 671 | "../rtc_base:checks", |
Artem Titov | e41c433 | 2018-07-25 15:04:28 +0200 | [diff] [blame] | 672 | "../rtc_base/third_party/sigslot", |
Bjorn Terelius | 3e67676 | 2018-10-29 15:26:27 +0100 | [diff] [blame] | 673 | "../system_wrappers:field_trial", |
| 674 | "../test:field_trial", |
Kári Tristan Helgason | ede7cb2 | 2019-03-06 10:34:09 +0100 | [diff] [blame] | 675 | "../test:platform_video_capturer", |
Tommi | 25eb47c | 2019-08-29 16:39:05 +0200 | [diff] [blame] | 676 | "../test:rtp_test_utils", |
Niels Möller | b76be9a | 2018-12-20 16:28:23 +0100 | [diff] [blame] | 677 | "//third_party/abseil-cpp/absl/memory", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 678 | "//third_party/abseil-cpp/absl/types:optional", |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 679 | ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 680 | if (is_win) { |
| 681 | sources += [ |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 682 | "peerconnection/client/flag_defs.h", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 683 | "peerconnection/client/main.cc", |
| 684 | "peerconnection/client/main_wnd.cc", |
| 685 | "peerconnection/client/main_wnd.h", |
| 686 | ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 687 | configs += [ "//build/config/win:windowed" ] |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 688 | deps += [ "../media:rtc_media_base" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 689 | } |
| 690 | if (is_linux) { |
| 691 | sources += [ |
| 692 | "peerconnection/client/linux/main.cc", |
| 693 | "peerconnection/client/linux/main_wnd.cc", |
| 694 | "peerconnection/client/linux/main_wnd.h", |
| 695 | ] |
Henrik Kjellander | efbde2c | 2017-03-27 08:28:27 +0200 | [diff] [blame] | 696 | cflags = [ "-Wno-deprecated-declarations" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 697 | libs = [ |
| 698 | "X11", |
| 699 | "Xcomposite", |
| 700 | "Xext", |
| 701 | "Xrender", |
| 702 | ] |
thomasanderson | ef16e99 | 2016-12-13 02:57:43 -0800 | [diff] [blame] | 703 | deps += [ "//build/config/linux/gtk" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 704 | } |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 705 | |
| 706 | deps += [ |
Niels Möller | 8366e17 | 2018-02-14 12:20:13 +0100 | [diff] [blame] | 707 | "../api:libjingle_peerconnection_api", |
Karl Wiberg | 1b0eae3 | 2017-10-17 14:48:54 +0200 | [diff] [blame] | 708 | "../api/audio_codecs:builtin_audio_decoder_factory", |
| 709 | "../api/audio_codecs:builtin_audio_encoder_factory", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame] | 710 | "../api/video:video_frame", |
Chen Xing | 5d24b16 | 2019-06-10 12:59:38 +0200 | [diff] [blame] | 711 | "../api/video:video_rtp_headers", |
Anders Carlsson | 6753795 | 2018-05-03 11:28:29 +0200 | [diff] [blame] | 712 | "../api/video_codecs:builtin_video_decoder_factory", |
| 713 | "../api/video_codecs:builtin_video_encoder_factory", |
Mirko Bonadei | 75baa49 | 2018-01-11 17:07:30 +0100 | [diff] [blame] | 714 | "../media:rtc_audio_video", |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 715 | "../modules/audio_device", |
| 716 | "../modules/audio_processing", |
Alessio Bazzica | b768e88 | 2018-11-07 14:29:54 +0000 | [diff] [blame] | 717 | "../modules/audio_processing:api", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 718 | "../modules/video_capture:video_capture_module", |
| 719 | "../pc:libjingle_peerconnection", |
Niels Möller | b76be9a | 2018-12-20 16:28:23 +0100 | [diff] [blame] | 720 | "../pc:peerconnection", |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 721 | "../rtc_base", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 722 | "../rtc_base:rtc_base_approved", |
| 723 | "../rtc_base:rtc_json", |
Niels Möller | b76be9a | 2018-12-20 16:28:23 +0100 | [diff] [blame] | 724 | "../test:video_test_common", |
Mirko Bonadei | 0be40bf | 2019-07-16 18:40:05 +0200 | [diff] [blame] | 725 | "//third_party/abseil-cpp/absl/flags:flag", |
| 726 | "//third_party/abseil-cpp/absl/flags:parse", |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 727 | "//third_party/libyuv", |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 728 | ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 729 | } |
kjellander | d4626e5 | 2016-09-07 02:33:01 -0700 | [diff] [blame] | 730 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 731 | rtc_executable("peerconnection_server") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 732 | testonly = true |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 733 | sources = [ |
| 734 | "peerconnection/server/data_socket.cc", |
| 735 | "peerconnection/server/data_socket.h", |
| 736 | "peerconnection/server/main.cc", |
| 737 | "peerconnection/server/peer_channel.cc", |
| 738 | "peerconnection/server/peer_channel.h", |
| 739 | "peerconnection/server/utils.cc", |
| 740 | "peerconnection/server/utils.h", |
| 741 | ] |
| 742 | deps = [ |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 743 | "../rtc_base:rtc_base_approved", |
Bjorn Terelius | 3e67676 | 2018-10-29 15:26:27 +0100 | [diff] [blame] | 744 | "../system_wrappers:field_trial", |
| 745 | "../test:field_trial", |
Mirko Bonadei | 04cffe3 | 2019-06-25 15:43:23 +0200 | [diff] [blame] | 746 | "//third_party/abseil-cpp/absl/flags:flag", |
| 747 | "//third_party/abseil-cpp/absl/flags:parse", |
Mirko Bonadei | 76c89da | 2019-07-19 12:12:14 +0200 | [diff] [blame] | 748 | "//third_party/abseil-cpp/absl/flags:usage", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 749 | ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 750 | } |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 751 | rtc_executable("turnserver") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 752 | testonly = true |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 753 | sources = [ "turnserver/turnserver_main.cc" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 754 | deps = [ |
Niels Möller | 9862c2e | 2018-10-30 12:20:03 +0100 | [diff] [blame] | 755 | ":read_auth_file", |
Niels Möller | a134204 | 2018-11-08 16:47:14 +0100 | [diff] [blame] | 756 | "../p2p:p2p_server_utils", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 757 | "../p2p:rtc_p2p", |
| 758 | "../pc:rtc_pc", |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 759 | "../rtc_base", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 760 | "../rtc_base:rtc_base_approved", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 761 | ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 762 | } |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 763 | rtc_executable("stunserver") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 764 | testonly = true |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 765 | sources = [ "stunserver/stunserver_main.cc" ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 766 | deps = [ |
Niels Möller | a134204 | 2018-11-08 16:47:14 +0100 | [diff] [blame] | 767 | "../p2p:p2p_server_utils", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 768 | "../p2p:rtc_p2p", |
| 769 | "../pc:rtc_pc", |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 770 | "../rtc_base", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 771 | "../rtc_base:rtc_base_approved", |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 772 | ] |
kthelgason | 0727f15 | 2016-08-08 09:03:23 -0700 | [diff] [blame] | 773 | } |
| 774 | } |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 775 | |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 776 | if (is_win || is_android) { |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 777 | rtc_shared_library("webrtc_unity_plugin") { |
| 778 | testonly = true |
| 779 | sources = [ |
| 780 | "unityplugin/simple_peer_connection.cc", |
| 781 | "unityplugin/simple_peer_connection.h", |
| 782 | "unityplugin/unity_plugin_apis.cc", |
| 783 | "unityplugin/unity_plugin_apis.h", |
gyzhou | b38f386 | 2017-07-25 16:04:31 -0700 | [diff] [blame] | 784 | "unityplugin/video_observer.cc", |
| 785 | "unityplugin/video_observer.h", |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 786 | ] |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 787 | |
| 788 | if (is_android) { |
| 789 | sources += [ |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 790 | "unityplugin/class_reference_holder.cc", |
| 791 | "unityplugin/class_reference_holder.h", |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 792 | "unityplugin/jni_onload.cc", |
| 793 | ] |
Qiang Chen | 43fb912 | 2017-12-20 10:47:36 -0800 | [diff] [blame] | 794 | suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 795 | } |
| 796 | |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 797 | if (is_win) { |
Mirko Bonadei | f957dd9 | 2018-07-11 10:47:42 +0200 | [diff] [blame] | 798 | configs += [ "//build/config/win:windowed" ] |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 799 | } |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 800 | deps = [ |
Mirko Bonadei | 2ff3f49 | 2018-11-22 09:00:13 +0100 | [diff] [blame] | 801 | "../api:create_peerconnection_factory", |
Mirko Bonadei | 34814c7 | 2018-01-11 10:13:56 +0100 | [diff] [blame] | 802 | "../api:libjingle_peerconnection_api", |
Niels Möller | e942b14 | 2019-09-17 14:30:41 +0200 | [diff] [blame] | 803 | "../api:media_stream_interface", |
Qiang Chen | 51e2046 | 2017-12-05 11:11:21 -0800 | [diff] [blame] | 804 | "../api/audio_codecs:builtin_audio_decoder_factory", |
| 805 | "../api/audio_codecs:builtin_audio_encoder_factory", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame] | 806 | "../api/video:video_frame", |
Chen Xing | 5d24b16 | 2019-06-10 12:59:38 +0200 | [diff] [blame] | 807 | "../api/video:video_rtp_headers", |
Mirko Bonadei | 75baa49 | 2018-01-11 17:07:30 +0100 | [diff] [blame] | 808 | "../media:rtc_audio_video", |
Anders Carlsson | a114c88 | 2018-01-04 15:10:22 +0100 | [diff] [blame] | 809 | "../media:rtc_internal_video_codecs", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 810 | "../media:rtc_media", |
| 811 | "../media:rtc_media_base", |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 812 | "../modules/audio_device", |
| 813 | "../modules/audio_processing", |
Alessio Bazzica | b768e88 | 2018-11-07 14:29:54 +0000 | [diff] [blame] | 814 | "../modules/audio_processing:api", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 815 | "../modules/video_capture:video_capture_module", |
| 816 | "../pc:libjingle_peerconnection", |
Niels Möller | 0a59535 | 2019-01-02 15:12:38 +0100 | [diff] [blame] | 817 | "../pc:peerconnection", |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 818 | "../rtc_base", |
Kári Tristan Helgason | ede7cb2 | 2019-03-06 10:34:09 +0100 | [diff] [blame] | 819 | "../test:platform_video_capturer", |
Niels Möller | 0a59535 | 2019-01-02 15:12:38 +0100 | [diff] [blame] | 820 | "../test:video_test_common", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 821 | "//third_party/abseil-cpp/absl/memory", |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 822 | ] |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 823 | if (is_android) { |
George Zhou | 2770c3d | 2018-03-07 09:58:54 -0800 | [diff] [blame] | 824 | deps += [ |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 825 | "../modules/utility", |
George Zhou | 2770c3d | 2018-03-07 09:58:54 -0800 | [diff] [blame] | 826 | "../sdk/android:libjingle_peerconnection_jni", |
| 827 | ] |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 828 | } |
| 829 | } |
| 830 | } |
| 831 | |
| 832 | if (is_android) { |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 833 | rtc_android_library("webrtc_unity_java") { |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 834 | sources = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ] |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 835 | deps = [ |
| 836 | "../rtc_base:base_java", |
Artem Titarenko | 69540f4 | 2018-12-10 12:30:46 +0100 | [diff] [blame] | 837 | "../sdk/android:camera_java", |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 838 | "../sdk/android:libjingle_peerconnection_java", |
Artem Titarenko | 69540f4 | 2018-12-10 12:30:46 +0100 | [diff] [blame] | 839 | "../sdk/android:peerconnection_java", |
| 840 | "../sdk/android:video_java", |
Peter Wen | 7bc331f | 2019-03-06 09:18:57 -0500 | [diff] [blame] | 841 | "//third_party/android_deps:com_android_support_support_annotations_java", |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 842 | ] |
| 843 | } |
| 844 | |
| 845 | dist_jar("libwebrtc_unity") { |
| 846 | _target_dir_name = get_label_info(":$target_name", "dir") |
| 847 | output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar" |
George Zhou | 2770c3d | 2018-03-07 09:58:54 -0800 | [diff] [blame] | 848 | direct_deps_only = false |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 849 | use_interface_jars = false |
George Zhou | 2770c3d | 2018-03-07 09:58:54 -0800 | [diff] [blame] | 850 | use_unprocessed_jars = false |
Oleh Prypin | 86021d9 | 2017-09-24 22:29:06 +0200 | [diff] [blame] | 851 | requires_android = true |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 852 | deps = [ |
| 853 | ":webrtc_unity_java", |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 854 | "../rtc_base:base_java", |
| 855 | "../sdk/android:libjingle_peerconnection_java", |
| 856 | "../sdk/android:libjingle_peerconnection_metrics_default_java", |
Peter Wen | 7bc331f | 2019-03-06 09:18:57 -0500 | [diff] [blame] | 857 | "//third_party/android_deps:com_android_support_support_annotations_java", |
qiangchen | 42f96d5 | 2017-08-08 17:08:03 -0700 | [diff] [blame] | 858 | ] |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 859 | } |
Mirko Bonadei | 73aa2de | 2020-01-20 15:28:57 +0100 | [diff] [blame] | 860 | |
| 861 | junit_binary("android_examples_junit_tests") { |
| 862 | sources = [ |
| 863 | "androidjunit/src/org/appspot/apprtc/BluetoothManagerTest.java", |
| 864 | "androidjunit/src/org/appspot/apprtc/DirectRTCClientTest.java", |
| 865 | "androidjunit/src/org/appspot/apprtc/TCPChannelClientTest.java", |
| 866 | ] |
| 867 | |
| 868 | deps = [ |
| 869 | ":AppRTCMobile_javalib", |
Artem Titov | a4dfe24 | 2020-06-03 16:42:57 +0200 | [diff] [blame] | 870 | "../sdk/android:peerconnection_java", |
Mirko Bonadei | 73aa2de | 2020-01-20 15:28:57 +0100 | [diff] [blame] | 871 | "//base:base_java_test_support", |
| 872 | "//third_party/google-truth:google_truth_java", |
| 873 | ] |
| 874 | |
| 875 | additional_jar_files = [ [ |
| 876 | "../sdk/android/tests/resources/robolectric.properties", |
| 877 | "robolectric.properties", |
| 878 | ] ] |
| 879 | } |
gyzhou | ad7cad8 | 2017-05-11 16:10:03 -0700 | [diff] [blame] | 880 | } |
| 881 | |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 882 | if (!build_with_chromium) { |
| 883 | # Doesn't build within Chrome on Win. |
| 884 | rtc_executable("stun_prober") { |
kjellander | 1993b1d | 2017-03-06 00:29:21 -0800 | [diff] [blame] | 885 | testonly = true |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 886 | sources = [ "stunprober/main.cc" ] |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 887 | deps = [ |
| 888 | "../p2p:libstunprober", |
| 889 | "../p2p:rtc_p2p", |
Artem Titov | 94b57c0 | 2019-03-21 13:35:10 +0100 | [diff] [blame] | 890 | "../rtc_base", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 891 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 892 | "../rtc_base:rtc_base_approved", |
Mirko Bonadei | 0be40bf | 2019-07-16 18:40:05 +0200 | [diff] [blame] | 893 | "//third_party/abseil-cpp/absl/flags:flag", |
| 894 | "//third_party/abseil-cpp/absl/flags:parse", |
charujain | aca3a24 | 2016-11-01 03:09:15 -0700 | [diff] [blame] | 895 | ] |
| 896 | } |
| 897 | } |