diff --git a/examples/BUILD.gn b/examples/BUILD.gn index 8d5a8f3abe..2ed599a212 100644 --- a/examples/BUILD.gn +++ b/examples/BUILD.gn @@ -731,6 +731,7 @@ if (is_linux || is_win) { "relayserver/relayserver_main.cc", ] deps = [ + "../p2p:p2p_server_utils", "../p2p:rtc_p2p", "../pc:rtc_pc", "../rtc_base:rtc_base", @@ -747,6 +748,7 @@ if (is_linux || is_win) { "turnserver/turnserver_main.cc", ] deps = [ + "../p2p:p2p_server_utils", "../p2p:rtc_p2p", "../pc:rtc_pc", "../rtc_base:rtc_base", @@ -763,6 +765,7 @@ if (is_linux || is_win) { "stunserver/stunserver_main.cc", ] deps = [ + "../p2p:p2p_server_utils", "../p2p:rtc_p2p", "../pc:rtc_pc", "../rtc_base:rtc_base", diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn index 252d182400..60dbd312f2 100644 --- a/p2p/BUILD.gn +++ b/p2p/BUILD.gn @@ -109,15 +109,6 @@ rtc_static_library("rtc_p2p") { if (is_nacl) { deps += [ "//native_client_sdk/src/libraries/nacl_io" ] } - } else { - sources += [ - "base/relayserver.cc", - "base/relayserver.h", - "base/stunserver.cc", - "base/stunserver.h", - "base/turnserver.cc", - "base/turnserver.h", - ] } } @@ -139,6 +130,7 @@ if (rtc_include_tests) { "base/testturnserver.h", ] deps = [ + ":p2p_server_utils", ":rtc_p2p", "../api:libjingle_peerconnection_api", "../api:ortc_api", @@ -180,6 +172,7 @@ if (rtc_include_tests) { "client/basicportallocator_unittest.cc", ] deps = [ + ":p2p_server_utils", ":p2p_test_utils", ":rtc_p2p", "../api:ortc_api", @@ -200,6 +193,25 @@ if (rtc_include_tests) { } } +rtc_source_set("p2p_server_utils") { + testonly = true + sources = [ + "base/relayserver.cc", + "base/relayserver.h", + "base/stunserver.cc", + "base/stunserver.h", + "base/turnserver.cc", + "base/turnserver.h", + ] + deps = [ + ":rtc_p2p", + "../rtc_base:checks", + "../rtc_base:rtc_base", + "../rtc_base/third_party/sigslot", + "//third_party/abseil-cpp/absl/memory", + ] +} + rtc_static_library("libstunprober") { visibility = [ "*" ] sources = [