OLD | NEW |
---|---|
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 sources = [ | 26 sources = [ |
27 "src/jni/androidhistogram_jni.cc", | 27 "src/jni/androidhistogram_jni.cc", |
28 "src/jni/androidmediacodeccommon.h", | 28 "src/jni/androidmediacodeccommon.h", |
29 "src/jni/androidmediadecoder_jni.cc", | |
30 "src/jni/androidmediadecoder_jni.h", | |
31 "src/jni/androidmediaencoder_jni.cc", | |
32 "src/jni/androidmediaencoder_jni.h", | |
33 "src/jni/androidnetworkmonitor_jni.cc", | 29 "src/jni/androidnetworkmonitor_jni.cc", |
34 "src/jni/androidnetworkmonitor_jni.h", | 30 "src/jni/androidnetworkmonitor_jni.h", |
35 "src/jni/androidvideotracksource.cc", | 31 "src/jni/androidvideotracksource.cc", |
36 "src/jni/androidvideotracksource.h", | 32 "src/jni/androidvideotracksource.h", |
37 "src/jni/androidvideotracksource_jni.cc", | 33 "src/jni/androidvideotracksource_jni.cc", |
38 "src/jni/classreferenceholder.cc", | 34 "src/jni/classreferenceholder.cc", |
39 "src/jni/classreferenceholder.h", | 35 "src/jni/classreferenceholder.h", |
40 "src/jni/jni_helpers.cc", | 36 "src/jni/jni_helpers.cc", |
41 "src/jni/jni_helpers.h", | 37 "src/jni/jni_helpers.h", |
42 "src/jni/native_handle_impl.cc", | |
43 "src/jni/native_handle_impl.h", | |
44 "src/jni/peerconnection_jni.cc", | 38 "src/jni/peerconnection_jni.cc", |
45 "src/jni/rtcstatscollectorcallbackwrapper.cc", | 39 "src/jni/rtcstatscollectorcallbackwrapper.cc", |
46 "src/jni/rtcstatscollectorcallbackwrapper.h", | 40 "src/jni/rtcstatscollectorcallbackwrapper.h", |
47 "src/jni/surfacetexturehelper_jni.cc", | |
48 "src/jni/surfacetexturehelper_jni.h", | |
49 ] | 41 ] |
50 | 42 |
51 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] | 43 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] |
52 | 44 |
53 if (is_clang) { | 45 if (is_clang) { |
54 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 46 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
55 suppressed_configs += [ | 47 suppressed_configs += [ |
56 "//build/config/clang:extra_warnings", | 48 "//build/config/clang:extra_warnings", |
57 "//build/config/clang:find_bad_constructs", | 49 "//build/config/clang:find_bad_constructs", |
58 ] | 50 ] |
59 } | 51 } |
60 | 52 |
61 # TODO(jschuh): Bug 1348: fix this warning. | 53 # TODO(jschuh): Bug 1348: fix this warning. |
62 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 54 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
63 | 55 |
64 if (is_win) { | 56 if (is_win) { |
65 cflags += [ | 57 cflags += [ |
66 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. | 58 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
67 "/wd4389", # signed/unsigned mismatch. | 59 "/wd4389", # signed/unsigned mismatch. |
68 ] | 60 ] |
69 } | 61 } |
70 | 62 |
71 deps = [ | 63 deps = [ |
64 ":libjingle_peerconnection_audio_jni", | |
65 ":libjingle_peerconnection_video_jni", | |
72 "../..:webrtc_common", | 66 "../..:webrtc_common", |
73 "../../api:video_frame_api", | |
74 "../../api/video_codecs:video_codecs_api", | |
75 "../../base:rtc_base", | 67 "../../base:rtc_base", |
76 "../../base:rtc_base_approved", | 68 "../../base:rtc_base_approved", |
77 "../../base:rtc_task_queue", | 69 "../../base:rtc_task_queue", |
78 "../../common_video:common_video", | 70 "../../media:rtc_audio_video", |
79 "../../media:rtc_media", | 71 "../../media:rtc_media", |
80 "../../media:rtc_media_base", | 72 "../../media:rtc_media_base", |
81 "../../modules/utility:utility", | 73 "../../modules/utility:utility", |
74 "../../system_wrappers:system_wrappers", | |
75 "//webrtc/pc:libjingle_peerconnection", | |
76 ] | |
77 } | |
78 | |
79 rtc_static_library("libjingle_peerconnection_audio_jni") { | |
Zhi Huang
2017/05/18 03:55:39
These are the top level target which the applicati
| |
80 deps = [ | |
81 "../../voice_engine:voice_engine", | |
82 "//webrtc/pc:libjingle_peerconnection_audio", | |
83 "//webrtc/pc:libjingle_peerconnection_media", | |
84 ] | |
85 } | |
86 | |
87 rtc_static_library("libjingle_peerconnection_audio_nullimpl_jni") { | |
Zhi Huang
2017/05/18 03:55:38
These are the top level target which the applicati
| |
88 deps = [ | |
89 "//webrtc/pc:libjingle_peerconnection_audio_nullimpl", | |
90 "//webrtc/pc:libjingle_peerconnection_media_nullimpl", | |
91 "//webrtc/pc:rtc_pc_audio_nullimpl", | |
92 ] | |
93 } | |
94 | |
95 rtc_static_library("libjingle_peerconnection_video_jni") { | |
Zhi Huang
2017/05/18 03:55:38
Similar to audio.
| |
96 sources = [ | |
97 "src/jni/androidmediadecoder_jni.cc", | |
98 "src/jni/androidmediadecoder_jni.h", | |
99 "src/jni/androidmediaencoder_jni.cc", | |
100 "src/jni/androidmediaencoder_jni.h", | |
101 "src/jni/native_handle_impl.cc", | |
102 "src/jni/native_handle_impl.h", | |
103 "src/jni/peerconnection_video_jni.cc", | |
104 "src/jni/surfacetexturehelper_jni.cc", | |
105 "src/jni/surfacetexturehelper_jni.h", | |
106 "src/jni/video_renderer_jni.cc", | |
107 ] | |
108 | |
109 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] | |
110 | |
111 if (is_clang) { | |
112 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
113 suppressed_configs += [ | |
114 "//build/config/clang:extra_warnings", | |
115 "//build/config/clang:find_bad_constructs", | |
116 ] | |
117 } | |
118 | |
119 # TODO(jschuh): Bug 1348: fix this warning. | |
120 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | |
121 | |
122 if (is_win) { | |
123 cflags += [ | |
124 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. | |
125 "/wd4389", # signed/unsigned mismatch. | |
126 ] | |
127 } | |
128 | |
129 deps = [ | |
130 "../../api:video_frame_api", | |
131 "../../api/video_codecs:video_codecs_api", | |
132 "../../common_video:common_video", | |
82 "../../modules/video_coding:video_coding_utility", | 133 "../../modules/video_coding:video_coding_utility", |
83 "../../system_wrappers:system_wrappers", | 134 "//webrtc/pc:libjingle_peerconnection_media", |
84 "../../voice_engine:voice_engine", | |
85 "//webrtc/pc:libjingle_peerconnection", | |
86 ] | 135 ] |
87 | 136 |
88 if (rtc_build_libyuv) { | 137 if (rtc_build_libyuv) { |
89 deps += [ "$rtc_libyuv_dir" ] | 138 deps += [ "$rtc_libyuv_dir" ] |
90 public_deps = [ | 139 public_deps = [ |
91 "$rtc_libyuv_dir", | 140 "$rtc_libyuv_dir", |
92 ] | 141 ] |
93 } else { | 142 } else { |
94 # Need to add a directory normally exported by libyuv. | 143 # Need to add a directory normally exported by libyuv. |
95 include_dirs = [ "$rtc_libyuv_dir/include" ] | 144 include_dirs = [ "$rtc_libyuv_dir/include" ] |
96 } | 145 } |
97 } | 146 } |
98 | 147 |
148 rtc_static_library("libjingle_peerconnection_video_nullimpl_jni") { | |
149 sources = [ | |
150 "src/jni/peerconnection_video_nullimpl_jni.cc", | |
151 ] | |
152 | |
153 deps = [ | |
154 "//webrtc/media:rtc_media_video_base_nullimpl", | |
155 "//webrtc/pc:libjingle_peerconnection_media_nullimpl", | |
156 ] | |
157 } | |
158 | |
159 rtc_static_library("libjingle_peerconnection_base_jni") { | |
Zhi Huang
2017/05/18 03:55:38
The target without audio and video.
| |
160 sources = [ | |
161 "src/jni/androidhistogram_jni.cc", | |
162 "src/jni/androidmediacodeccommon.h", | |
163 "src/jni/androidnetworkmonitor_jni.cc", | |
164 "src/jni/androidnetworkmonitor_jni.h", | |
165 "src/jni/classreferenceholder.cc", | |
166 "src/jni/classreferenceholder.h", | |
167 "src/jni/jni_helpers.cc", | |
168 "src/jni/jni_helpers.h", | |
169 "src/jni/peerconnection_jni.cc", | |
170 "src/jni/rtcstatscollectorcallbackwrapper.cc", | |
171 "src/jni/rtcstatscollectorcallbackwrapper.h", | |
172 ] | |
173 | |
174 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] | |
175 | |
176 if (is_clang) { | |
177 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
178 suppressed_configs += [ | |
179 "//build/config/clang:extra_warnings", | |
180 "//build/config/clang:find_bad_constructs", | |
181 ] | |
182 } | |
183 | |
184 # TODO(jschuh): Bug 1348: fix this warning. | |
185 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | |
186 | |
187 if (is_win) { | |
188 cflags += [ | |
189 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. | |
190 "/wd4389", # signed/unsigned mismatch. | |
191 ] | |
192 } | |
193 | |
194 deps = [ | |
195 "../..:webrtc_common", | |
196 "../../base:rtc_base", | |
197 "../../base:rtc_base_approved", | |
198 "../../base:rtc_task_queue", | |
199 "../../media:rtc_media", | |
200 "../../media:rtc_media_base", | |
201 "../../modules/utility:utility", | |
202 "../../system_wrappers:system_wrappers", | |
203 "//webrtc/pc:libjingle_peerconnection_base", | |
204 ] | |
205 } | |
206 | |
207 rtc_static_library("libjingle_peerconnection_base_metrics_default_jni") { | |
208 sources = [ | |
209 "src/jni/androidmetrics_jni.cc", | |
210 ] | |
211 | |
212 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] | |
213 | |
214 deps = [ | |
215 ":libjingle_peerconnection_base_jni", | |
216 "../../system_wrappers", | |
217 "//webrtc/pc:libjingle_peerconnection_base", | |
218 "//webrtc/system_wrappers:field_trial_default", | |
219 "//webrtc/system_wrappers:metrics_default", | |
220 ] | |
221 } | |
222 | |
99 rtc_static_library("libjingle_peerconnection_metrics_default_jni") { | 223 rtc_static_library("libjingle_peerconnection_metrics_default_jni") { |
100 sources = [ | 224 sources = [ |
101 "src/jni/androidmetrics_jni.cc", | 225 "src/jni/androidmetrics_jni.cc", |
102 ] | 226 ] |
103 | 227 |
104 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] | 228 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] |
105 | 229 |
106 deps = [ | 230 deps = [ |
107 ":libjingle_peerconnection_jni", | 231 ":libjingle_peerconnection_jni", |
108 "../../system_wrappers", | 232 "../../system_wrappers", |
109 "//webrtc/pc:libjingle_peerconnection", | 233 "//webrtc/pc:libjingle_peerconnection", |
110 "//webrtc/system_wrappers:field_trial_default", | 234 "//webrtc/system_wrappers:field_trial_default", |
111 "//webrtc/system_wrappers:metrics_default", | 235 "//webrtc/system_wrappers:metrics_default", |
112 ] | 236 ] |
113 } | 237 } |
114 | 238 |
239 rtc_shared_library("libjingle_peerconnection_datachannel_only_so") { | |
Zhi Huang
2017/05/18 03:55:38
This is just an example of how to use these target
| |
240 sources = [ | |
241 "src/jni/jni_onload.cc", | |
242 ] | |
243 | |
244 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] | |
245 configs += [ "//build/config/android:hide_all_but_jni" ] | |
246 | |
247 deps = [ | |
248 ":libjingle_peerconnection_audio_nullimpl_jni", | |
249 ":libjingle_peerconnection_base_jni", | |
250 ":libjingle_peerconnection_base_metrics_default_jni", | |
251 ":libjingle_peerconnection_video_nullimpl_jni", | |
252 "../../base:rtc_base", | |
253 "//webrtc/pc:libjingle_peerconnection_base", | |
254 ] | |
255 output_extension = "so" | |
256 } | |
257 | |
115 rtc_shared_library("libjingle_peerconnection_so") { | 258 rtc_shared_library("libjingle_peerconnection_so") { |
116 sources = [ | 259 sources = [ |
117 "src/jni/jni_onload.cc", | 260 "src/jni/jni_onload.cc", |
118 ] | 261 ] |
119 | 262 |
120 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] | 263 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] |
121 configs += [ "//build/config/android:hide_all_but_jni" ] | 264 configs += [ "//build/config/android:hide_all_but_jni" ] |
122 | 265 |
123 deps = [ | 266 deps = [ |
124 ":libjingle_peerconnection_jni", | 267 ":libjingle_peerconnection_jni", |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
252 "//third_party/android_support_test_runner:runner_java", | 395 "//third_party/android_support_test_runner:runner_java", |
253 "//third_party/junit", | 396 "//third_party/junit", |
254 "//webrtc/base:base_java", | 397 "//webrtc/base:base_java", |
255 "//webrtc/sdk/android:libjingle_peerconnection_java", | 398 "//webrtc/sdk/android:libjingle_peerconnection_java", |
256 "//webrtc/sdk/android:libjingle_peerconnection_metrics_default_java", | 399 "//webrtc/sdk/android:libjingle_peerconnection_metrics_default_java", |
257 ] | 400 ] |
258 | 401 |
259 shared_libraries = [ "//webrtc/sdk/android:libjingle_peerconnection_so" ] | 402 shared_libraries = [ "//webrtc/sdk/android:libjingle_peerconnection_so" ] |
260 } | 403 } |
261 } | 404 } |
OLD | NEW |