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