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_datachannel_only_jni") { | |
sakal
2017/05/11 11:06:12
Can we just conditionally include files in the reg
magjed_webrtc
2017/05/11 13:02:02
This approach does not look composable. Can we spl
Zhi Huang
2017/05/12 20:05:33
Acknowledged.
I'll try to split it and remove all
Zhi Huang
2017/05/12 20:05:33
I did that before but I realized that we can't do
| |
26 sources = [ | |
27 "src/jni/androidhistogram_jni.cc", | |
28 "src/jni/androidmediacodeccommon.h", | |
29 "src/jni/androidnetworkmonitor_jni.cc", | |
30 "src/jni/androidnetworkmonitor_jni.h", | |
31 "src/jni/classreferenceholder.cc", | |
32 "src/jni/classreferenceholder.h", | |
33 "src/jni/jni_helpers.cc", | |
34 "src/jni/jni_helpers.h", | |
35 "src/jni/peerconnection_jni.cc", | |
36 "src/jni/rtcstatscollectorcallbackwrapper.cc", | |
37 "src/jni/rtcstatscollectorcallbackwrapper.h", | |
38 ] | |
39 | |
40 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] | |
41 | |
42 if (is_clang) { | |
43 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
44 suppressed_configs += [ | |
45 "//build/config/clang:extra_warnings", | |
46 "//build/config/clang:find_bad_constructs", | |
47 ] | |
48 } | |
49 | |
50 # TODO(jschuh): Bug 1348: fix this warning. | |
51 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | |
52 | |
53 if (is_win) { | |
54 cflags += [ | |
55 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. | |
56 "/wd4389", # signed/unsigned mismatch. | |
57 ] | |
58 } | |
59 | |
60 deps = [ | |
61 "../..:webrtc_common", | |
62 "../../base:rtc_base", | |
63 "../../base:rtc_base_approved", | |
64 "../../base:rtc_task_queue", | |
65 "../../media:rtc_media_base_datachannel_only", | |
66 "../../media:rtc_media_datachannel_only", | |
67 "../../modules/utility:utility", | |
68 "../../system_wrappers:system_wrappers", | |
69 "//webrtc/pc:libjingle_peerconnection_datachannel_only", | |
70 ] | |
71 | |
72 if (rtc_build_libyuv) { | |
73 deps += [ "$rtc_libyuv_dir" ] | |
74 public_deps = [ | |
75 "$rtc_libyuv_dir", | |
76 ] | |
77 } else { | |
78 # Need to add a directory normally exported by libyuv. | |
79 include_dirs = [ "$rtc_libyuv_dir/include" ] | |
80 } | |
81 } | |
82 | |
25 rtc_static_library("libjingle_peerconnection_jni") { | 83 rtc_static_library("libjingle_peerconnection_jni") { |
84 defines = [ | |
85 "HAVE_WEBRTC_VOICE", | |
86 "HAVE_WEBRTC_VIDEO", | |
87 ] | |
88 | |
26 sources = [ | 89 sources = [ |
27 "src/jni/androidhistogram_jni.cc", | 90 "src/jni/androidhistogram_jni.cc", |
28 "src/jni/androidmediacodeccommon.h", | 91 "src/jni/androidmediacodeccommon.h", |
29 "src/jni/androidmediadecoder_jni.cc", | 92 "src/jni/androidmediadecoder_jni.cc", |
30 "src/jni/androidmediadecoder_jni.h", | 93 "src/jni/androidmediadecoder_jni.h", |
31 "src/jni/androidmediaencoder_jni.cc", | 94 "src/jni/androidmediaencoder_jni.cc", |
32 "src/jni/androidmediaencoder_jni.h", | 95 "src/jni/androidmediaencoder_jni.h", |
33 "src/jni/androidnetworkmonitor_jni.cc", | 96 "src/jni/androidnetworkmonitor_jni.cc", |
34 "src/jni/androidnetworkmonitor_jni.h", | 97 "src/jni/androidnetworkmonitor_jni.h", |
35 "src/jni/androidvideotracksource.cc", | 98 "src/jni/androidvideotracksource.cc", |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 deps += [ "$rtc_libyuv_dir" ] | 152 deps += [ "$rtc_libyuv_dir" ] |
90 public_deps = [ | 153 public_deps = [ |
91 "$rtc_libyuv_dir", | 154 "$rtc_libyuv_dir", |
92 ] | 155 ] |
93 } else { | 156 } else { |
94 # Need to add a directory normally exported by libyuv. | 157 # Need to add a directory normally exported by libyuv. |
95 include_dirs = [ "$rtc_libyuv_dir/include" ] | 158 include_dirs = [ "$rtc_libyuv_dir/include" ] |
96 } | 159 } |
97 } | 160 } |
98 | 161 |
162 rtc_static_library( | |
163 "libjingle_peerconnection_datachannel_only_metrics_default_jni") { | |
164 sources = [ | |
165 "src/jni/androidmetrics_jni.cc", | |
166 ] | |
167 | |
168 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] | |
169 | |
170 deps = [ | |
171 ":libjingle_peerconnection_datachannel_only_jni", | |
172 "../../system_wrappers", | |
173 "//webrtc/pc:libjingle_peerconnection_datachannel_only", | |
174 "//webrtc/system_wrappers:field_trial_default", | |
175 "//webrtc/system_wrappers:metrics_default", | |
176 ] | |
177 } | |
178 | |
99 rtc_static_library("libjingle_peerconnection_metrics_default_jni") { | 179 rtc_static_library("libjingle_peerconnection_metrics_default_jni") { |
100 sources = [ | 180 sources = [ |
101 "src/jni/androidmetrics_jni.cc", | 181 "src/jni/androidmetrics_jni.cc", |
102 ] | 182 ] |
103 | 183 |
104 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] | 184 configs += [ ":libjingle_peerconnection_jni_warnings_config" ] |
105 | 185 |
106 deps = [ | 186 deps = [ |
107 ":libjingle_peerconnection_jni", | 187 ":libjingle_peerconnection_jni", |
108 "../../system_wrappers", | 188 "../../system_wrappers", |
109 "//webrtc/pc:libjingle_peerconnection", | 189 "//webrtc/pc:libjingle_peerconnection", |
110 "//webrtc/system_wrappers:field_trial_default", | 190 "//webrtc/system_wrappers:field_trial_default", |
111 "//webrtc/system_wrappers:metrics_default", | 191 "//webrtc/system_wrappers:metrics_default", |
112 ] | 192 ] |
113 } | 193 } |
114 | 194 |
195 rtc_shared_library("libjingle_peerconnection_datachannel_only_so") { | |
196 sources = [ | |
197 "src/jni/jni_onload.cc", | |
198 ] | |
199 | |
200 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] | |
201 configs += [ "//build/config/android:hide_all_but_jni" ] | |
202 | |
203 deps = [ | |
204 ":libjingle_peerconnection_datachannel_only_jni", | |
205 ":libjingle_peerconnection_datachannel_only_metrics_default_jni", | |
206 "../../base:rtc_base", | |
207 "//webrtc/pc:libjingle_peerconnection_datachannel_only", | |
208 ] | |
209 output_extension = "so" | |
210 } | |
211 | |
115 rtc_shared_library("libjingle_peerconnection_so") { | 212 rtc_shared_library("libjingle_peerconnection_so") { |
116 sources = [ | 213 sources = [ |
117 "src/jni/jni_onload.cc", | 214 "src/jni/jni_onload.cc", |
118 ] | 215 ] |
119 | 216 |
120 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] | 217 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] |
121 configs += [ "//build/config/android:hide_all_but_jni" ] | 218 configs += [ "//build/config/android:hide_all_but_jni" ] |
122 | 219 |
123 deps = [ | 220 deps = [ |
124 ":libjingle_peerconnection_jni", | 221 ":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", | 349 "//third_party/android_support_test_runner:runner_java", |
253 "//third_party/junit", | 350 "//third_party/junit", |
254 "//webrtc/base:base_java", | 351 "//webrtc/base:base_java", |
255 "//webrtc/sdk/android:libjingle_peerconnection_java", | 352 "//webrtc/sdk/android:libjingle_peerconnection_java", |
256 "//webrtc/sdk/android:libjingle_peerconnection_metrics_default_java", | 353 "//webrtc/sdk/android:libjingle_peerconnection_metrics_default_java", |
257 ] | 354 ] |
258 | 355 |
259 shared_libraries = [ "//webrtc/sdk/android:libjingle_peerconnection_so" ] | 356 shared_libraries = [ "//webrtc/sdk/android:libjingle_peerconnection_so" ] |
260 } | 357 } |
261 } | 358 } |
OLD | NEW |