| 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.gni") | 9 import("../webrtc.gni") |
| 10 if (is_android) { | 10 if (is_android) { |
| 11 import("//build/config/android/config.gni") | 11 import("//build/config/android/config.gni") |
| 12 import("//build/config/android/rules.gni") | 12 import("//build/config/android/rules.gni") |
| 13 } | 13 } |
| 14 | 14 |
| 15 group("pc") { | 15 group("pc") { |
| 16 public_deps = [ | 16 public_deps = [ |
| 17 ":rtc_pc", | 17 ":rtc_pc", |
| 18 ] | 18 ] |
| 19 } | 19 } |
| 20 | 20 |
| 21 config("rtc_pc_config") { | 21 config("rtc_pc_config") { |
| 22 defines = [] | 22 defines = [] |
| 23 if (rtc_enable_sctp) { | 23 if (rtc_enable_sctp) { |
| 24 defines += [ "HAVE_SCTP" ] | 24 defines += [ "HAVE_SCTP" ] |
| 25 } | 25 } |
| 26 } | 26 } |
| 27 | 27 |
| 28 rtc_static_library("rtc_pc") { | 28 rtc_source_set("rtc_pc_sources") { |
| 29 defines = [] | |
| 30 sources = [ | 29 sources = [ |
| 31 "audiomonitor.cc", | 30 "audiomonitor.cc", |
| 32 "audiomonitor.h", | 31 "audiomonitor.h", |
| 33 "bundlefilter.cc", | 32 "bundlefilter.cc", |
| 34 "bundlefilter.h", | 33 "bundlefilter.h", |
| 35 "channel.cc", | |
| 36 "channel.h", | |
| 37 "channelmanager.cc", | |
| 38 "channelmanager.h", | |
| 39 "currentspeakermonitor.cc", | 34 "currentspeakermonitor.cc", |
| 40 "currentspeakermonitor.h", | 35 "currentspeakermonitor.h", |
| 41 "externalhmac.cc", | 36 "externalhmac.cc", |
| 42 "externalhmac.h", | 37 "externalhmac.h", |
| 43 "mediamonitor.cc", | 38 "mediamonitor.cc", |
| 44 "mediamonitor.h", | 39 "mediamonitor.h", |
| 45 "mediasession.cc", | |
| 46 "mediasession.h", | |
| 47 "rtcpmuxfilter.cc", | 40 "rtcpmuxfilter.cc", |
| 48 "rtcpmuxfilter.h", | 41 "rtcpmuxfilter.h", |
| 49 "rtptransport.cc", | 42 "rtptransport.cc", |
| 50 "rtptransport.h", | 43 "rtptransport.h", |
| 51 "srtpfilter.cc", | 44 "srtpfilter.cc", |
| 52 "srtpfilter.h", | 45 "srtpfilter.h", |
| 53 "voicechannel.h", | 46 "voicechannel.h", |
| 54 ] | 47 ] |
| 55 | 48 |
| 56 deps = [ | |
| 57 "../api:call_api", | |
| 58 "../base:rtc_base", | |
| 59 "../media", | |
| 60 ] | |
| 61 | |
| 62 if (rtc_build_libsrtp) { | 49 if (rtc_build_libsrtp) { |
| 63 deps += [ "//third_party/libsrtp" ] | 50 deps = [ |
| 51 "//third_party/libsrtp", |
| 52 ] |
| 64 } | 53 } |
| 65 | 54 |
| 66 public_configs = [ ":rtc_pc_config" ] | 55 public_configs = [ ":rtc_pc_config" ] |
| 67 | 56 |
| 68 if (!build_with_chromium && is_clang) { | 57 if (!build_with_chromium && is_clang) { |
| 69 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 58 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 59 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 60 } |
| 61 } |
| 62 |
| 63 rtc_static_library("rtc_pc_datachannel_only") { |
| 64 sources = [ |
| 65 "channel.cc", |
| 66 "channel.h", |
| 67 "channelmanager.cc", |
| 68 "channelmanager.h", |
| 69 "mediasession.cc", |
| 70 "mediasession.h", |
| 71 ] |
| 72 |
| 73 deps = [ |
| 74 ":rtc_pc_sources", |
| 75 "../api:call_api", |
| 76 "../base:rtc_base", |
| 77 "../media:rtc_media_datachannel_only", |
| 78 ] |
| 79 |
| 80 if (!build_with_chromium && is_clang) { |
| 81 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 82 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 83 } |
| 84 } |
| 85 |
| 86 rtc_static_library("rtc_pc") { |
| 87 defines = [ |
| 88 "HAVE_WEBRTC_VOICE", |
| 89 "HAVE_WEBRTC_VIDEO", |
| 90 ] |
| 91 |
| 92 sources = [ |
| 93 "channel.cc", |
| 94 "channel.h", |
| 95 "channelmanager.cc", |
| 96 "channelmanager.h", |
| 97 "mediasession.cc", |
| 98 "mediasession.h", |
| 99 ] |
| 100 |
| 101 deps = [ |
| 102 ":rtc_pc_sources", |
| 103 "../api:call_api", |
| 104 "../base:rtc_base", |
| 105 "../media:rtc_media", |
| 106 ] |
| 107 |
| 108 if (!build_with_chromium && is_clang) { |
| 109 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 70 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 110 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 71 } | 111 } |
| 72 } | 112 } |
| 73 | 113 |
| 74 config("libjingle_peerconnection_warnings_config") { | 114 config("libjingle_peerconnection_warnings_config") { |
| 75 # GN orders flags on a target before flags from configs. The default config | 115 # GN orders flags on a target before flags from configs. The default config |
| 76 # adds these flags so to cancel them out they need to come from a config and | 116 # adds these flags so to cancel them out they need to come from a config and |
| 77 # cannot be on the target directly. | 117 # cannot be on the target directly. |
| 78 if (!is_win && !is_clang) { | 118 if (!is_win && !is_clang) { |
| 79 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. | 119 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. |
| 80 } | 120 } |
| 81 } | 121 } |
| 82 | 122 |
| 83 rtc_static_library("libjingle_peerconnection") { | 123 rtc_source_set("libjingle_peerconnection_sources") { |
| 84 cflags = [] | 124 cflags = [] |
| 85 sources = [ | 125 sources = [ |
| 86 "audiotrack.cc", | 126 "audiotrack.cc", |
| 87 "audiotrack.h", | 127 "audiotrack.h", |
| 88 "datachannel.cc", | 128 "datachannel.cc", |
| 89 "datachannel.h", | 129 "datachannel.h", |
| 90 "dtmfsender.cc", | 130 "dtmfsender.cc", |
| 91 "dtmfsender.h", | 131 "dtmfsender.h", |
| 92 "iceserverparsing.cc", | 132 "iceserverparsing.cc", |
| 93 "iceserverparsing.h", | 133 "iceserverparsing.h", |
| 94 "jsepicecandidate.cc", | 134 "jsepicecandidate.cc", |
| 95 "jsepsessiondescription.cc", | 135 "jsepsessiondescription.cc", |
| 96 "localaudiosource.cc", | 136 "localaudiosource.cc", |
| 97 "localaudiosource.h", | 137 "localaudiosource.h", |
| 98 "mediastream.cc", | 138 "mediastream.cc", |
| 99 "mediastream.h", | 139 "mediastream.h", |
| 100 "mediastreamobserver.cc", | 140 "mediastreamobserver.cc", |
| 101 "mediastreamobserver.h", | 141 "mediastreamobserver.h", |
| 102 "mediastreamtrack.h", | 142 "mediastreamtrack.h", |
| 103 "peerconnection.cc", | |
| 104 "peerconnection.h", | |
| 105 "peerconnectionfactory.cc", | |
| 106 "peerconnectionfactory.h", | |
| 107 "remoteaudiosource.cc", | 143 "remoteaudiosource.cc", |
| 108 "remoteaudiosource.h", | 144 "remoteaudiosource.h", |
| 109 "rtcstatscollector.cc", | 145 "rtcstatscollector.cc", |
| 110 "rtcstatscollector.h", | 146 "rtcstatscollector.h", |
| 111 "rtpreceiver.cc", | 147 "rtpreceiver.cc", |
| 112 "rtpreceiver.h", | 148 "rtpreceiver.h", |
| 113 "rtpsender.cc", | 149 "rtpsender.cc", |
| 114 "rtpsender.h", | 150 "rtpsender.h", |
| 115 "sctputils.cc", | 151 "sctputils.cc", |
| 116 "sctputils.h", | 152 "sctputils.h", |
| (...skipping 17 matching lines...) Expand all Loading... |
| 134 ] | 170 ] |
| 135 | 171 |
| 136 configs += [ ":libjingle_peerconnection_warnings_config" ] | 172 configs += [ ":libjingle_peerconnection_warnings_config" ] |
| 137 | 173 |
| 138 if (!build_with_chromium && is_clang) { | 174 if (!build_with_chromium && is_clang) { |
| 139 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 175 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 140 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 176 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 141 } | 177 } |
| 142 | 178 |
| 143 deps = [ | 179 deps = [ |
| 144 ":rtc_pc", | |
| 145 "../api:call_api", | 180 "../api:call_api", |
| 146 "../api:rtc_stats_api", | 181 "../api:rtc_stats_api", |
| 147 "../api/video_codecs:video_codecs_api", | 182 "../api/video_codecs:video_codecs_api", |
| 148 "../call", | 183 "../logging:rtc_event_log_api", |
| 149 "../media", | |
| 150 "../stats", | 184 "../stats", |
| 151 ] | 185 ] |
| 152 | 186 |
| 153 public_deps = [ | 187 public_deps = [ |
| 154 "../api:libjingle_peerconnection_api", | 188 "../api:libjingle_peerconnection_api", |
| 155 ] | 189 ] |
| 156 | 190 |
| 157 if (rtc_use_quic) { | 191 if (rtc_use_quic) { |
| 158 sources += [ | 192 sources += [ |
| 159 "quicdatachannel.cc", | 193 "quicdatachannel.cc", |
| 160 "quicdatachannel.h", | 194 "quicdatachannel.h", |
| 161 "quicdatatransport.cc", | 195 "quicdatatransport.cc", |
| 162 "quicdatatransport.h", | 196 "quicdatatransport.h", |
| 163 ] | 197 ] |
| 164 deps += [ "//third_party/libquic" ] | 198 deps += [ "//third_party/libquic" ] |
| 165 public_deps = [ | 199 public_deps = [ |
| 166 "//third_party/libquic", | 200 "//third_party/libquic", |
| 167 ] | 201 ] |
| 168 } | 202 } |
| 169 } | 203 } |
| 170 | 204 |
| 205 rtc_static_library("libjingle_peerconnection_datachannel_only") { |
| 206 sources = [ |
| 207 "peerconnection.cc", |
| 208 "peerconnection.h", |
| 209 "peerconnectionfactory.cc", |
| 210 "peerconnectionfactory.h", |
| 211 ] |
| 212 |
| 213 deps = [ |
| 214 ":rtc_pc_datachannel_only", |
| 215 ] |
| 216 |
| 217 public_deps = [ |
| 218 ":libjingle_peerconnection_sources", |
| 219 ] |
| 220 |
| 221 if (!build_with_chromium && is_clang) { |
| 222 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 223 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 224 } |
| 225 } |
| 226 |
| 227 rtc_static_library("libjingle_peerconnection") { |
| 228 defines = [ |
| 229 "HAVE_WEBRTC_VOICE", |
| 230 "HAVE_WEBRTC_VIDEO", |
| 231 ] |
| 232 |
| 233 sources = [ |
| 234 "peerconnection.cc", |
| 235 "peerconnection.h", |
| 236 "peerconnectionfactory.cc", |
| 237 "peerconnectionfactory.h", |
| 238 ] |
| 239 |
| 240 deps = [ |
| 241 ":rtc_pc", |
| 242 "../call", |
| 243 ] |
| 244 |
| 245 public_deps = [ |
| 246 ":libjingle_peerconnection_sources", |
| 247 ] |
| 248 |
| 249 if (!build_with_chromium && is_clang) { |
| 250 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 251 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 252 } |
| 253 } |
| 254 |
| 171 if (rtc_include_tests) { | 255 if (rtc_include_tests) { |
| 172 config("rtc_pc_unittests_config") { | 256 config("rtc_pc_unittests_config") { |
| 173 # GN orders flags on a target before flags from configs. The default config | 257 # GN orders flags on a target before flags from configs. The default config |
| 174 # adds -Wall, and this flag have to be after -Wall -- so they need to | 258 # adds -Wall, and this flag have to be after -Wall -- so they need to |
| 175 # come from a config and can't be on the target directly. | 259 # come from a config and can't be on the target directly. |
| 176 if (!is_win && !is_clang) { | 260 if (!is_win && !is_clang) { |
| 177 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. | 261 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. |
| 178 } | 262 } |
| 179 } | 263 } |
| 180 | 264 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 300 |
| 217 if (rtc_build_libsrtp) { | 301 if (rtc_build_libsrtp) { |
| 218 deps += [ "//third_party/libsrtp" ] | 302 deps += [ "//third_party/libsrtp" ] |
| 219 } | 303 } |
| 220 | 304 |
| 221 if (is_android) { | 305 if (is_android) { |
| 222 deps += [ "//testing/android/native_test:native_test_support" ] | 306 deps += [ "//testing/android/native_test:native_test_support" ] |
| 223 } | 307 } |
| 224 } | 308 } |
| 225 | 309 |
| 226 rtc_source_set("pc_test_utils") { | 310 rtc_source_set("pc_test_utils_sources") { |
| 227 testonly = true | 311 testonly = true |
| 228 sources = [ | 312 sources = [ |
| 229 "test/fakeaudiocapturemodule.cc", | 313 "test/fakeaudiocapturemodule.cc", |
| 230 "test/fakeaudiocapturemodule.h", | 314 "test/fakeaudiocapturemodule.h", |
| 231 "test/fakedatachannelprovider.h", | 315 "test/fakedatachannelprovider.h", |
| 232 "test/fakeperiodicvideocapturer.h", | 316 "test/fakeperiodicvideocapturer.h", |
| 233 "test/fakertccertificategenerator.h", | 317 "test/fakertccertificategenerator.h", |
| 234 "test/fakevideotrackrenderer.h", | 318 "test/fakevideotrackrenderer.h", |
| 235 "test/fakevideotracksource.h", | 319 "test/fakevideotracksource.h", |
| 236 "test/mock_datachannel.h", | 320 "test/mock_datachannel.h", |
| 237 "test/mock_peerconnection.h", | 321 "test/mock_peerconnection.h", |
| 238 "test/mock_webrtcsession.h", | 322 "test/mock_webrtcsession.h", |
| 239 "test/mockpeerconnectionobservers.h", | 323 "test/mockpeerconnectionobservers.h", |
| 240 "test/peerconnectiontestwrapper.cc", | 324 "test/peerconnectiontestwrapper.cc", |
| 241 "test/peerconnectiontestwrapper.h", | 325 "test/peerconnectiontestwrapper.h", |
| 242 "test/rtcstatsobtainer.h", | 326 "test/rtcstatsobtainer.h", |
| 243 "test/testsdpstrings.h", | 327 "test/testsdpstrings.h", |
| 244 ] | 328 ] |
| 245 | 329 |
| 246 deps = [ | 330 public_deps = [ |
| 247 ":libjingle_peerconnection", | |
| 248 "../base:rtc_base_tests_utils", | 331 "../base:rtc_base_tests_utils", |
| 249 "//testing/gmock", | 332 "//testing/gmock", |
| 250 ] | 333 ] |
| 251 | 334 |
| 252 if (!build_with_chromium && is_clang) { | 335 if (!build_with_chromium && is_clang) { |
| 253 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 336 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 254 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 337 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 255 } | 338 } |
| 256 } | 339 } |
| 257 | 340 |
| 341 rtc_source_set("pc_datachannel_only_test_utils") { |
| 342 testonly = true |
| 343 deps = [ |
| 344 ":libjingle_peerconnection_datachannel_only", |
| 345 ] |
| 346 |
| 347 public_deps = [ |
| 348 ":pc_test_utils_sources", |
| 349 ] |
| 350 } |
| 351 |
| 352 rtc_source_set("pc_test_utils") { |
| 353 testonly = true |
| 354 deps = [ |
| 355 ":libjingle_peerconnection", |
| 356 ] |
| 357 |
| 358 public_deps = [ |
| 359 ":pc_test_utils_sources", |
| 360 ] |
| 361 } |
| 362 |
| 258 config("peerconnection_unittests_config") { | 363 config("peerconnection_unittests_config") { |
| 259 # The warnings below are enabled by default. Since GN orders compiler flags | 364 # The warnings below are enabled by default. Since GN orders compiler flags |
| 260 # for a target before flags from configs, the only way to disable such | 365 # for a target before flags from configs, the only way to disable such |
| 261 # warnings is by having them in a separate config, loaded from the target. | 366 # warnings is by having them in a separate config, loaded from the target. |
| 262 # TODO(kjellander): Make the code compile without disabling these flags. | 367 # TODO(kjellander): Make the code compile without disabling these flags. |
| 263 # See https://bugs.webrtc.org/3307. | 368 # See https://bugs.webrtc.org/3307. |
| 264 if (is_clang && is_win) { | 369 if (is_clang && is_win) { |
| 265 cflags = [ | 370 cflags = [ |
| 266 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267 | 371 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267 |
| 267 # for -Wno-sign-compare | 372 # for -Wno-sign-compare |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 "../system_wrappers:metrics_default", | 466 "../system_wrappers:metrics_default", |
| 362 "//testing/gmock", | 467 "//testing/gmock", |
| 363 ] | 468 ] |
| 364 | 469 |
| 365 if (is_android) { | 470 if (is_android) { |
| 366 deps += [ "//testing/android/native_test:native_test_support" ] | 471 deps += [ "//testing/android/native_test:native_test_support" ] |
| 367 | 472 |
| 368 shard_timeout = 900 | 473 shard_timeout = 900 |
| 369 } | 474 } |
| 370 } | 475 } |
| 476 |
| 477 rtc_test("peerconnection_datachannel_only_unittests") { |
| 478 check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
| 479 testonly = true |
| 480 sources = [ |
| 481 "peerconnectionendtoend_datachannel_only_unittest.cc", |
| 482 ] |
| 483 |
| 484 if (rtc_enable_sctp) { |
| 485 defines = [ "HAVE_SCTP" ] |
| 486 } |
| 487 |
| 488 configs += [ ":peerconnection_unittests_config" ] |
| 489 |
| 490 if (!build_with_chromium && is_clang) { |
| 491 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 492 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 493 } |
| 494 |
| 495 # TODO(jschuh): Bug 1348: fix this warning. |
| 496 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 497 |
| 498 if (is_win) { |
| 499 cflags = [ |
| 500 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch. |
| 501 "/wd4389", # signed/unsigned mismatch. |
| 502 ] |
| 503 } |
| 504 |
| 505 deps = [] |
| 506 if (is_android) { |
| 507 sources += [ |
| 508 "test/androidtestinitializer.cc", |
| 509 "test/androidtestinitializer.h", |
| 510 ] |
| 511 deps += [ |
| 512 "//testing/android/native_test:native_test_support", |
| 513 "//webrtc/sdk/android:libjingle_peerconnection_datachannel_only_jni", |
| 514 "//webrtc/sdk/android:libjingle_peerconnection_java", |
| 515 ] |
| 516 } |
| 517 |
| 518 deps += [ |
| 519 ":libjingle_peerconnection_datachannel_only", |
| 520 ":pc_datachannel_only_test_utils", |
| 521 "..:webrtc_common", |
| 522 "../api:fakemetricsobserver", |
| 523 "../base:rtc_base_tests_main", |
| 524 "../base:rtc_base_tests_utils", |
| 525 "../pc:rtc_pc_datachannel_only", |
| 526 "../system_wrappers:metrics_default", |
| 527 "//testing/gmock", |
| 528 ] |
| 529 |
| 530 if (is_android) { |
| 531 deps += [ "//testing/android/native_test:native_test_support" ] |
| 532 |
| 533 shard_timeout = 900 |
| 534 } |
| 535 } |
| 371 } | 536 } |
| OLD | NEW |