diff --git a/webrtc/examples/BUILD.gn b/webrtc/examples/BUILD.gn index 64ff05b430..3945e560c2 100644 --- a/webrtc/examples/BUILD.gn +++ b/webrtc/examples/BUILD.gn @@ -31,6 +31,10 @@ group("examples") { ] } + if (!build_with_chromium) { + public_deps += [ ":stun_prober" ] + } + if (is_ios || (is_mac && target_cpu != "x86")) { public_deps += [ ":AppRTCMobile" ] } @@ -539,3 +543,24 @@ if (is_linux || is_win) { } } } + +if (!build_with_chromium) { + # Doesn't build within Chrome on Win. + rtc_executable("stun_prober") { + sources = [ + "stunprober/main.cc", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from Chrome's Clang plugins. + # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + "../p2p:libstunprober", + "../p2p:rtc_p2p", + "../system_wrappers:field_trial_default", + ] + } +} diff --git a/webrtc/p2p/stunprober/main.cc b/webrtc/examples/stunprober/main.cc similarity index 100% rename from webrtc/p2p/stunprober/main.cc rename to webrtc/examples/stunprober/main.cc diff --git a/webrtc/p2p/BUILD.gn b/webrtc/p2p/BUILD.gn index 03cbd6bca0..c196181078 100644 --- a/webrtc/p2p/BUILD.gn +++ b/webrtc/p2p/BUILD.gn @@ -13,10 +13,6 @@ group("p2p") { ":libstunprober", ":rtc_p2p", ] - if (!build_with_chromium) { - # TODO(kjellander): Move this to examples or tools. - public_deps += [ ":stun_prober" ] - } } config("rtc_p2p_inherited_config") { @@ -159,24 +155,3 @@ rtc_static_library("libstunprober") { "../base:rtc_base", ] } - -if (!build_with_chromium) { - # Doesn't build within Chrome on Win. - rtc_executable("stun_prober") { - sources = [ - "stunprober/main.cc", - ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from Chrome's Clang plugins. - # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - deps = [ - ":libstunprober", - ":rtc_p2p", - "../system_wrappers:field_trial_default", - ] - } -} diff --git a/webrtc/p2p/p2p.gyp b/webrtc/p2p/p2p.gyp index 6f046a91d7..19c022ff40 100644 --- a/webrtc/p2p/p2p.gyp +++ b/webrtc/p2p/p2p.gyp @@ -128,17 +128,6 @@ 'stunprober/stunprober.cc', ], }, - { - 'target_name': 'stun_prober', - 'type': 'executable', - 'dependencies': [ - 'libstunprober', - 'rtc_p2p' - ], - 'sources': [ - 'stunprober/main.cc', - ], - }, ], # targets } diff --git a/webrtc/webrtc_examples.gyp b/webrtc/webrtc_examples.gyp index 6627c31343..38fbd35f0b 100755 --- a/webrtc/webrtc_examples.gyp +++ b/webrtc/webrtc_examples.gyp @@ -465,6 +465,17 @@ '../build/android/test_runner.gypi', ], }, + { + 'target_name': 'stun_prober', + 'type': 'executable', + 'dependencies': [ + 'p2p:libstunprober', + 'p2p:rtc_p2p' + ], + 'sources': [ + 'examples/stunprober/main.cc', + ], + }, ], # targets }], # OS=="android" ],