| OLD | NEW |
| 1 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2015 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("../build/webrtc.gni") | 9 import("../build/webrtc.gni") |
| 10 import("//testing/test.gni") | |
| 11 if (is_android) { | 10 if (is_android) { |
| 12 import("//build/config/android/config.gni") | 11 import("//build/config/android/config.gni") |
| 13 import("//build/config/android/rules.gni") | 12 import("//build/config/android/rules.gni") |
| 14 } | 13 } |
| 15 | 14 |
| 16 group("api") { | 15 group("api") { |
| 17 deps = [ | 16 deps = [ |
| 18 ":libjingle_peerconnection", | 17 ":libjingle_peerconnection", |
| 19 ] | 18 ] |
| 20 } | 19 } |
| 21 | 20 |
| 22 source_set("call_api") { | 21 rtc_source_set("call_api") { |
| 23 sources = [ | 22 sources = [ |
| 24 "call/audio_receive_stream.h", | 23 "call/audio_receive_stream.h", |
| 25 "call/audio_send_stream.h", | 24 "call/audio_send_stream.h", |
| 26 "call/audio_sink.h", | 25 "call/audio_sink.h", |
| 27 "call/audio_state.h", | 26 "call/audio_state.h", |
| 28 ] | 27 ] |
| 29 | 28 |
| 30 configs += [ "..:common_config" ] | 29 configs += [ "..:common_config" ] |
| 31 public_configs = [ "..:common_inherited_config" ] | 30 public_configs = [ "..:common_inherited_config" ] |
| 32 | 31 |
| 33 deps = [ | 32 deps = [ |
| 34 # TODO(kjellander): Add remaining dependencies when webrtc:4243 is done. | 33 # TODO(kjellander): Add remaining dependencies when webrtc:4243 is done. |
| 35 "..:webrtc_common", | 34 "..:webrtc_common", |
| 36 "../base:rtc_base_approved", | 35 "../base:rtc_base_approved", |
| 37 "../modules/audio_coding:audio_encoder_interface", | 36 "../modules/audio_coding:audio_encoder_interface", |
| 38 ] | 37 ] |
| 39 } | 38 } |
| 40 | 39 |
| 41 config("libjingle_peerconnection_warnings_config") { | 40 config("libjingle_peerconnection_warnings_config") { |
| 42 # GN orders flags on a target before flags from configs. The default config | 41 # GN orders flags on a target before flags from configs. The default config |
| 43 # adds these flags so to cancel them out they need to come from a config and | 42 # adds these flags so to cancel them out they need to come from a config and |
| 44 # cannot be on the target directly. | 43 # cannot be on the target directly. |
| 45 if (!is_win && !is_clang) { | 44 if (!is_win && !is_clang) { |
| 46 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. | 45 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. |
| 47 } | 46 } |
| 48 } | 47 } |
| 49 | 48 |
| 50 source_set("libjingle_peerconnection") { | 49 rtc_source_set("libjingle_peerconnection") { |
| 51 cflags = [] | 50 cflags = [] |
| 52 sources = [ | 51 sources = [ |
| 53 "audiotrack.cc", | 52 "audiotrack.cc", |
| 54 "audiotrack.h", | 53 "audiotrack.h", |
| 55 "datachannel.cc", | 54 "datachannel.cc", |
| 56 "datachannel.h", | 55 "datachannel.h", |
| 57 "datachannelinterface.h", | 56 "datachannelinterface.h", |
| 58 "dtmfsender.cc", | 57 "dtmfsender.cc", |
| 59 "dtmfsender.h", | 58 "dtmfsender.h", |
| 60 "dtmfsenderinterface.h", | 59 "dtmfsenderinterface.h", |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 ] | 120 ] |
| 122 | 121 |
| 123 configs += [ | 122 configs += [ |
| 124 "..:common_config", | 123 "..:common_config", |
| 125 ":libjingle_peerconnection_warnings_config", | 124 ":libjingle_peerconnection_warnings_config", |
| 126 ] | 125 ] |
| 127 public_configs = [ "..:common_inherited_config" ] | 126 public_configs = [ "..:common_inherited_config" ] |
| 128 | 127 |
| 129 if (is_clang) { | 128 if (is_clang) { |
| 130 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 129 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 131 configs -= [ "//build/config/clang:find_bad_constructs" ] | 130 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
| 132 } | 131 } |
| 133 | 132 |
| 134 deps = [ | 133 deps = [ |
| 135 ":call_api", | 134 ":call_api", |
| 136 "../call", | 135 "../call", |
| 137 "../media", | 136 "../media", |
| 138 "../pc", | 137 "../pc", |
| 139 ] | 138 ] |
| 140 | 139 |
| 141 if (rtc_use_quic) { | 140 if (rtc_use_quic) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 160 # for a target before flags from configs, the only way to disable such | 159 # for a target before flags from configs, the only way to disable such |
| 161 # warnings is by having them in a separate config, loaded from the target. | 160 # warnings is by having them in a separate config, loaded from the target. |
| 162 if (!is_win) { | 161 if (!is_win) { |
| 163 cflags = [ | 162 cflags = [ |
| 164 "-Wno-sign-compare", | 163 "-Wno-sign-compare", |
| 165 "-Wno-unused-variable", | 164 "-Wno-unused-variable", |
| 166 ] | 165 ] |
| 167 } | 166 } |
| 168 } | 167 } |
| 169 | 168 |
| 170 source_set("libjingle_peerconnection_jni") { | 169 rtc_source_set("libjingle_peerconnection_jni") { |
| 171 sources = [ | 170 sources = [ |
| 172 "android/jni/androidmediacodeccommon.h", | 171 "android/jni/androidmediacodeccommon.h", |
| 173 "android/jni/androidmediadecoder_jni.cc", | 172 "android/jni/androidmediadecoder_jni.cc", |
| 174 "android/jni/androidmediadecoder_jni.h", | 173 "android/jni/androidmediadecoder_jni.h", |
| 175 "android/jni/androidmediaencoder_jni.cc", | 174 "android/jni/androidmediaencoder_jni.cc", |
| 176 "android/jni/androidmediaencoder_jni.h", | 175 "android/jni/androidmediaencoder_jni.h", |
| 177 "android/jni/androidmetrics_jni.cc", | 176 "android/jni/androidmetrics_jni.cc", |
| 178 "android/jni/androidnetworkmonitor_jni.cc", | 177 "android/jni/androidnetworkmonitor_jni.cc", |
| 179 "android/jni/androidnetworkmonitor_jni.h", | 178 "android/jni/androidnetworkmonitor_jni.h", |
| 180 "android/jni/androidvideotracksource_jni.cc", | 179 "android/jni/androidvideotracksource_jni.cc", |
| (...skipping 11 matching lines...) Expand all Loading... |
| 192 ] | 191 ] |
| 193 | 192 |
| 194 configs += [ | 193 configs += [ |
| 195 "..:common_config", | 194 "..:common_config", |
| 196 ":libjingle_peerconnection_jni_warnings_config", | 195 ":libjingle_peerconnection_jni_warnings_config", |
| 197 ] | 196 ] |
| 198 public_configs = [ "..:common_inherited_config" ] | 197 public_configs = [ "..:common_inherited_config" ] |
| 199 | 198 |
| 200 if (is_clang) { | 199 if (is_clang) { |
| 201 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 200 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 202 configs -= [ | 201 configs_suppressions += [ |
| 203 "//build/config/clang:extra_warnings", | 202 "//build/config/clang:extra_warnings", |
| 204 "//build/config/clang:find_bad_constructs", | 203 "//build/config/clang:find_bad_constructs", |
| 205 ] | 204 ] |
| 206 } | 205 } |
| 207 | 206 |
| 208 # TODO(jschuh): Bug 1348: fix this warning. | 207 # TODO(jschuh): Bug 1348: fix this warning. |
| 209 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 208 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 210 | 209 |
| 211 if (is_win) { | 210 if (is_win) { |
| 212 cflags += [ | 211 cflags += [ |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 "-Wno-unused-function", | 324 "-Wno-unused-function", |
| 326 ] | 325 ] |
| 327 } | 326 } |
| 328 | 327 |
| 329 if (!is_win) { | 328 if (!is_win) { |
| 330 cflags = [ "-Wno-sign-compare" ] | 329 cflags = [ "-Wno-sign-compare" ] |
| 331 cflags_cc = [ "-Wno-overloaded-virtual" ] | 330 cflags_cc = [ "-Wno-overloaded-virtual" ] |
| 332 } | 331 } |
| 333 } | 332 } |
| 334 | 333 |
| 335 test("peerconnection_unittests") { | 334 rtc_test("peerconnection_unittests") { |
| 336 testonly = true | 335 testonly = true |
| 337 sources = [ | 336 sources = [ |
| 338 "datachannel_unittest.cc", | 337 "datachannel_unittest.cc", |
| 339 "dtmfsender_unittest.cc", | 338 "dtmfsender_unittest.cc", |
| 340 "fakemetricsobserver.cc", | 339 "fakemetricsobserver.cc", |
| 341 "fakemetricsobserver.h", | 340 "fakemetricsobserver.h", |
| 342 "jsepsessiondescription_unittest.cc", | 341 "jsepsessiondescription_unittest.cc", |
| 343 "localaudiosource_unittest.cc", | 342 "localaudiosource_unittest.cc", |
| 344 "mediaconstraintsinterface_unittest.cc", | 343 "mediaconstraintsinterface_unittest.cc", |
| 345 "mediastream_unittest.cc", | 344 "mediastream_unittest.cc", |
| (...skipping 28 matching lines...) Expand all Loading... |
| 374 defines = [ "HAVE_SCTP" ] | 373 defines = [ "HAVE_SCTP" ] |
| 375 | 374 |
| 376 configs += [ | 375 configs += [ |
| 377 "..:common_config", | 376 "..:common_config", |
| 378 ":peerconnection_unittests_config", | 377 ":peerconnection_unittests_config", |
| 379 ] | 378 ] |
| 380 public_configs = [ "..:common_inherited_config" ] | 379 public_configs = [ "..:common_inherited_config" ] |
| 381 | 380 |
| 382 if (is_clang) { | 381 if (is_clang) { |
| 383 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 382 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 384 configs -= [ "//build/config/clang:find_bad_constructs" ] | 383 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
| 385 } | 384 } |
| 386 | 385 |
| 387 # TODO(jschuh): Bug 1348: fix this warning. | 386 # TODO(jschuh): Bug 1348: fix this warning. |
| 388 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 387 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 389 | 388 |
| 390 if (is_win) { | 389 if (is_win) { |
| 391 cflags = [ | 390 cflags = [ |
| 392 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch. | 391 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch. |
| 393 "/wd4389", # signed/unsigned mismatch. | 392 "/wd4389", # signed/unsigned mismatch. |
| 394 ] | 393 ] |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 | 461 |
| 463 shared_libraries = [ ":libjingle_peerconnection_so" ] | 462 shared_libraries = [ ":libjingle_peerconnection_so" ] |
| 464 } | 463 } |
| 465 | 464 |
| 466 android_resources("libjingle_peerconnection_android_unittest_resources") { | 465 android_resources("libjingle_peerconnection_android_unittest_resources") { |
| 467 resource_dirs = [ "androidtests/res" ] | 466 resource_dirs = [ "androidtests/res" ] |
| 468 custom_package = "org.webrtc" | 467 custom_package = "org.webrtc" |
| 469 } | 468 } |
| 470 } | 469 } |
| 471 } | 470 } |
| OLD | NEW |