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