Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(874)

Side by Side Diff: webrtc/sdk/android/BUILD.gn

Issue 2854123003: Build WebRTC with data channel only. (Closed)
Patch Set: Add a Java level test. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 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 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 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 import("//webrtc/webrtc.gni") 9 import("//webrtc/webrtc.gni")
10 import("//build/config/android/config.gni") 10 import("//build/config/android/config.gni")
11 import("//build/config/android/rules.gni") 11 import("//build/config/android/rules.gni")
12 12
13 config("libjingle_peerconnection_jni_warnings_config") { 13 config("libjingle_peerconnection_jni_warnings_config") {
14 # The warnings below are enabled by default. Since GN orders compiler flags 14 # The warnings below are enabled by default. Since GN orders compiler flags
15 # for a target before flags from configs, the only way to disable such 15 # for a target before flags from configs, the only way to disable such
16 # warnings is by having them in a separate config, loaded from the target. 16 # warnings is by having them in a separate config, loaded from the target.
17 if (!is_win) { 17 if (!is_win) {
18 cflags = [ 18 cflags = [
19 "-Wno-sign-compare", 19 "-Wno-sign-compare",
20 "-Wno-unused-variable", 20 "-Wno-unused-variable",
21 ] 21 ]
22 } 22 }
23 } 23 }
24 24
25 rtc_static_library("libjingle_peerconnection_jni") { 25 rtc_static_library("libjingle_peerconnection_jni") {
26 public_deps = [
27 ":base_jni",
28 ":webrtc_audio_jni",
29 ":webrtc_peerconnection_jni",
30 ":webrtc_video_jni",
31 ]
32 }
33
34 rtc_static_library("base_jni") {
35 sources = [
36 "src/jni/androidmediacodeccommon.h",
37 "src/jni/classreferenceholder.cc",
38 "src/jni/classreferenceholder.h",
39 "src/jni/jni_helpers.cc",
40 "src/jni/jni_helpers.h",
41 ]
42
43 deps = [
44 "../../base:rtc_base",
45 "../../base:rtc_base_approved",
46 ]
47
48 if (is_clang) {
49 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
50 suppressed_configs += [
51 "//build/config/clang:extra_warnings",
52 "//build/config/clang:find_bad_constructs",
53 ]
54 }
55 }
56
57 rtc_static_library("webrtc_audio_jni") {
sakal 2017/05/26 08:16:13 nit: I don't like webrtc_ prefix in any of the nam
kjellander_webrtc 2017/05/29 20:59:15 +1 let's at least use rtc_ instead, or nothing at
Zhi Huang 2017/05/31 00:03:29 Done.
Zhi Huang 2017/05/31 00:03:29 Done. I just not good at naming things. :)
58 deps = [
59 ":base_jni",
60 "../../pc:webrtc_audio",
61 "../../pc:webrtc_media",
62 "../../voice_engine:voice_engine",
63 ]
64 }
65
66 rtc_static_library("webrtc_null_audio_jni") {
67 deps = [
68 ":base_jni",
69 "../../pc:webrtc_null_audio",
70 "../../pc:webrtc_null_media",
71 ]
72 }
73
74 rtc_static_library("webrtc_video_jni") {
26 sources = [ 75 sources = [
27 "src/jni/androidhistogram_jni.cc", 76 "src/jni/androidhistogram_jni.cc",
28 "src/jni/androidmediacodeccommon.h",
29 "src/jni/androidmediadecoder_jni.cc", 77 "src/jni/androidmediadecoder_jni.cc",
30 "src/jni/androidmediadecoder_jni.h", 78 "src/jni/androidmediadecoder_jni.h",
31 "src/jni/androidmediaencoder_jni.cc", 79 "src/jni/androidmediaencoder_jni.cc",
32 "src/jni/androidmediaencoder_jni.h", 80 "src/jni/androidmediaencoder_jni.h",
33 "src/jni/androidnetworkmonitor_jni.cc",
34 "src/jni/androidnetworkmonitor_jni.h",
35 "src/jni/androidvideotracksource.cc", 81 "src/jni/androidvideotracksource.cc",
36 "src/jni/androidvideotracksource.h", 82 "src/jni/androidvideotracksource.h",
37 "src/jni/androidvideotracksource_jni.cc", 83 "src/jni/androidvideotracksource_jni.cc",
38 "src/jni/classreferenceholder.cc",
39 "src/jni/classreferenceholder.h",
40 "src/jni/jni_helpers.cc",
41 "src/jni/jni_helpers.h",
42 "src/jni/native_handle_impl.cc", 84 "src/jni/native_handle_impl.cc",
43 "src/jni/native_handle_impl.h", 85 "src/jni/native_handle_impl.h",
44 "src/jni/peerconnection_jni.cc",
45 "src/jni/rtcstatscollectorcallbackwrapper.cc",
46 "src/jni/rtcstatscollectorcallbackwrapper.h",
47 "src/jni/surfacetexturehelper_jni.cc", 86 "src/jni/surfacetexturehelper_jni.cc",
48 "src/jni/surfacetexturehelper_jni.h", 87 "src/jni/surfacetexturehelper_jni.h",
88 "src/jni/video_jni.cc",
89 "src/jni/video_renderer_jni.cc",
49 ] 90 ]
50 91
51 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] 92 configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
52 93
53 if (is_clang) { 94 if (is_clang) {
54 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 95 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
55 suppressed_configs += [ 96 suppressed_configs += [
56 "//build/config/clang:extra_warnings", 97 "//build/config/clang:extra_warnings",
57 "//build/config/clang:find_bad_constructs", 98 "//build/config/clang:find_bad_constructs",
58 ] 99 ]
59 } 100 }
60 101
61 # TODO(jschuh): Bug 1348: fix this warning. 102 # TODO(jschuh): Bug 1348: fix this warning.
62 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 103 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
63 104
64 if (is_win) { 105 if (is_win) {
65 cflags += [ 106 cflags += [
66 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. 107 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch.
67 "/wd4389", # signed/unsigned mismatch. 108 "/wd4389", # signed/unsigned mismatch.
68 ] 109 ]
69 } 110 }
70 111
71 deps = [ 112 deps = [
72 "../..:webrtc_common", 113 ":base_jni",
114 "../../api:libjingle_peerconnection_api",
73 "../../api:video_frame_api", 115 "../../api:video_frame_api",
74 "../../api/video_codecs:video_codecs_api", 116 "../../api/video_codecs:video_codecs_api",
75 "../../base:rtc_base", 117 "../../base:rtc_base",
76 "../../base:rtc_base_approved", 118 "../../base:rtc_base_approved",
77 "../../base:rtc_task_queue", 119 "../../base:rtc_task_queue",
78 "../../common_video:common_video", 120 "../../common_video:common_video",
79 "../../media:rtc_media", 121 "../../media:rtc_audio_video",
80 "../../media:rtc_media_base", 122 "../../media:rtc_media_data_base",
81 "../../modules/utility:utility",
82 "../../modules/video_coding:video_coding_utility", 123 "../../modules/video_coding:video_coding_utility",
124 "../../pc:webrtc_media",
83 "../../system_wrappers:system_wrappers", 125 "../../system_wrappers:system_wrappers",
84 "../../voice_engine:voice_engine", 126 "//webrtc:webrtc_common",
kjellander_webrtc 2017/05/29 20:59:15 There's no reason to use relative mixed with absol
Zhi Huang 2017/05/31 00:03:29 Done.
85 "//webrtc/pc:libjingle_peerconnection",
86 ] 127 ]
87 128
88 if (rtc_build_libyuv) { 129 if (rtc_build_libyuv) {
89 deps += [ "$rtc_libyuv_dir" ] 130 deps += [ "$rtc_libyuv_dir" ]
90 public_deps = [ 131 public_deps = [
91 "$rtc_libyuv_dir", 132 "$rtc_libyuv_dir",
92 ] 133 ]
93 } else { 134 } else {
94 # Need to add a directory normally exported by libyuv. 135 # Need to add a directory normally exported by libyuv.
95 include_dirs = [ "$rtc_libyuv_dir/include" ] 136 include_dirs = [ "$rtc_libyuv_dir/include" ]
96 } 137 }
97 } 138 }
98 139
140 rtc_static_library("webrtc_null_video_jni") {
141 sources = [
142 "src/jni/null_video_jni.cc",
143 ]
144
145 deps = [
146 ":base_jni",
147 "../../pc:webrtc_null_media",
148 ]
149
150 if (is_clang) {
151 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
152 suppressed_configs += [
153 "//build/config/clang:extra_warnings",
154 "//build/config/clang:find_bad_constructs",
155 ]
156 }
157 }
158
159 rtc_static_library("webrtc_peerconnection_jni") {
160 sources = [
161 "src/jni/androidnetworkmonitor_jni.cc",
162 "src/jni/androidnetworkmonitor_jni.h",
163 "src/jni/peerconnection_jni.cc",
164 "src/jni/rtcstatscollectorcallbackwrapper.cc",
165 "src/jni/rtcstatscollectorcallbackwrapper.h",
166 ]
167
168 configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
169
170 if (is_clang) {
171 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
172 suppressed_configs += [
173 "//build/config/clang:extra_warnings",
174 "//build/config/clang:find_bad_constructs",
175 ]
176 }
177
178 # TODO(jschuh): Bug 1348: fix this warning.
179 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
180
181 if (is_win) {
182 cflags += [
183 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch.
184 "/wd4389", # signed/unsigned mismatch.
185 ]
186 }
187
188 deps = [
189 ":base_jni",
190 "../..:webrtc_common",
191 "../../base:rtc_base",
192 "../../base:rtc_base_approved",
193 "../../base:rtc_task_queue",
194 "../../media:rtc_data",
195 "../../media:rtc_media_data_base",
196 "../../modules/utility:utility",
197 "../../pc:webrtc_peerconnection",
198 "../../system_wrappers:system_wrappers",
199 ]
200 }
201
202 rtc_static_library("webrtc_metrics_jni") {
203 sources = [
204 "src/jni/androidmetrics_jni.cc",
205 ]
206
207 configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
208
209 deps = [
210 ":base_jni",
211 ":webrtc_peerconnection_jni",
212 "../../pc:webrtc_peerconnection",
213 "../../system_wrappers",
214 "../../system_wrappers:field_trial_default",
215 "../../system_wrappers:metrics_default",
216 ]
217 }
218
99 rtc_static_library("libjingle_peerconnection_metrics_default_jni") { 219 rtc_static_library("libjingle_peerconnection_metrics_default_jni") {
100 sources = [ 220 sources = [
101 "src/jni/androidmetrics_jni.cc", 221 "src/jni/androidmetrics_jni.cc",
102 ] 222 ]
103 223
104 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] 224 configs += [ ":libjingle_peerconnection_jni_warnings_config" ]
105 225
106 deps = [ 226 deps = [
107 ":libjingle_peerconnection_jni", 227 ":libjingle_peerconnection_jni",
228 "../../pc:libjingle_peerconnection",
108 "../../system_wrappers", 229 "../../system_wrappers",
109 "//webrtc/pc:libjingle_peerconnection", 230 "../../system_wrappers:field_trial_default",
110 "//webrtc/system_wrappers:field_trial_default", 231 "../../system_wrappers:metrics_default",
111 "//webrtc/system_wrappers:metrics_default",
112 ] 232 ]
113 } 233 }
114 234
235 rtc_shared_library("libjingle_peerconnection_datachannelonly_so") {
Taylor Brandstetter 2017/05/30 17:30:53 Again, would be useful to have a comment that summ
Zhi Huang 2017/05/31 00:03:29 This is only for testing and it would be removed e
kjellander_webrtc 2017/06/01 05:34:30 I think it's fine to leave the target uncommented.
Zhi Huang 2017/06/02 05:16:43 Agree. We should have something to ensure that thi
236 sources = [
237 "src/jni/jni_onload.cc",
238 ]
239
240 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
241 configs += [ "//build/config/android:hide_all_but_jni" ]
242
243 deps = [
244 ":base_jni",
245 ":webrtc_metrics_jni",
246 ":webrtc_null_audio_jni",
247 ":webrtc_null_video_jni",
248 ":webrtc_peerconnection_jni",
249 "../../base:rtc_base",
250 "../../pc:webrtc_peerconnection",
251 ]
252 output_extension = "so"
253 }
254
115 rtc_shared_library("libjingle_peerconnection_so") { 255 rtc_shared_library("libjingle_peerconnection_so") {
116 sources = [ 256 sources = [
117 "src/jni/jni_onload.cc", 257 "src/jni/jni_onload.cc",
118 ] 258 ]
119 259
120 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] 260 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
121 configs += [ "//build/config/android:hide_all_but_jni" ] 261 configs += [ "//build/config/android:hide_all_but_jni" ]
122 262
123 deps = [ 263 deps = [
124 ":libjingle_peerconnection_jni", 264 ":libjingle_peerconnection_jni",
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 "//third_party/android_support_test_runner:runner_java", 392 "//third_party/android_support_test_runner:runner_java",
253 "//third_party/junit", 393 "//third_party/junit",
254 "//webrtc/base:base_java", 394 "//webrtc/base:base_java",
255 "//webrtc/sdk/android:libjingle_peerconnection_java", 395 "//webrtc/sdk/android:libjingle_peerconnection_java",
256 "//webrtc/sdk/android:libjingle_peerconnection_metrics_default_java", 396 "//webrtc/sdk/android:libjingle_peerconnection_metrics_default_java",
257 ] 397 ]
258 398
259 shared_libraries = [ "//webrtc/sdk/android:libjingle_peerconnection_so" ] 399 shared_libraries = [ "//webrtc/sdk/android:libjingle_peerconnection_so" ]
260 } 400 }
261 } 401 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698