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