Index: webrtc/examples/BUILD.gn |
diff --git a/webrtc/examples/BUILD.gn b/webrtc/examples/BUILD.gn |
index 310f651bf2df7efdc8a84a19513d390d911fa6b7..14604afbe4df8de7e3e9b907fc59a4d39affebf1 100644 |
--- a/webrtc/examples/BUILD.gn |
+++ b/webrtc/examples/BUILD.gn |
@@ -10,6 +10,10 @@ if (is_android) { |
import("//build/config/android/config.gni") |
import("//build/config/android/rules.gni") |
} |
+if (is_linux) { |
+ import("//webrtc/build/webrtc.gni") |
+ import("//build/config/linux/pkg_config.gni") |
+} |
group("examples") { |
deps = [] |
@@ -17,6 +21,15 @@ group("examples") { |
if (is_android && !build_with_chromium) { |
deps += [ ":AppRTCDemo" ] |
} |
+ if (is_linux) { |
tommi
2016/08/05 13:21:32
would prefer to include the same platforms as we h
|
+ deps += [ |
+ ":peerconnection_client", |
+ ":peerconnection_server", |
+ ":relayserver", |
+ ":stunserver", |
+ ":turnserver", |
+ ] |
+ } |
} |
if (is_android && !build_with_chromium) { |
@@ -101,3 +114,123 @@ if (is_android && !build_with_chromium) { |
] |
} |
} |
+ |
+#TODO(kthelgason): Support building on Windows |
tommi
2016/08/05 13:21:32
nit: space after #
|
+if (is_linux) { |
+ pkg_config("gtk2_config") { |
+ # Gtk requires gmodule, but it does not list it as a dependency in some |
+ # misconfigured systems. |
+ packages = [ |
+ "gmodule-2.0", |
+ "gtk+-2.0", |
+ "gthread-2.0", |
+ ] |
+ } |
+ public_configs = [ ":gtk2_config" ] |
+ executable("peerconnection_client") { |
+ sources = [ |
+ "peerconnection/client/conductor.cc", |
+ "peerconnection/client/conductor.h", |
+ "peerconnection/client/defaults.cc", |
+ "peerconnection/client/defaults.h", |
+ "peerconnection/client/peer_connection_client.cc", |
+ "peerconnection/client/peer_connection_client.h", |
+ ] |
+ if (is_clang) { |
+ # Suppress warnings from the Chromium Clang plugin. |
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
+ configs -= [ "//build/config/clang:find_bad_constructs" ] |
+ } |
+ if (is_linux) { |
+ sources += [ |
+ "peerconnection/client/linux/main.cc", |
+ "peerconnection/client/linux/main_wnd.cc", |
+ "peerconnection/client/linux/main_wnd.h", |
+ ] |
+ libs = [ |
+ "X11", |
+ "Xcomposite", |
+ "Xext", |
+ "Xrender", |
+ ] |
+ } |
+ deps = [ |
+ "//build/config/linux/gtk2", |
+ "//webrtc/api:libjingle_peerconnection", |
+ "//webrtc/system_wrappers:field_trial_default", |
+ "//webrtc/system_wrappers:metrics_default", |
+ ] |
+ if (rtc_build_json) { |
+ deps += [ "//third_party/jsoncpp" ] |
+ } |
+ } |
+ executable("peerconnection_server") { |
+ sources = [ |
+ "peerconnection/server/data_socket.cc", |
+ "peerconnection/server/data_socket.h", |
+ "peerconnection/server/main.cc", |
+ "peerconnection/server/peer_channel.cc", |
+ "peerconnection/server/peer_channel.h", |
+ "peerconnection/server/utils.cc", |
+ "peerconnection/server/utils.h", |
+ ] |
+ deps = [ |
+ "//webrtc:webrtc_common", |
+ "//webrtc/base:rtc_base_approved", |
+ "//webrtc/tools:command_line_parser", |
+ ] |
+ if (is_clang) { |
+ # Suppress warnings from the Chromium Clang plugin. |
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
+ configs -= [ "//build/config/clang:find_bad_constructs" ] |
+ } |
+ } |
+ executable("relayserver") { |
+ sources = [ |
+ "relayserver/relayserver_main.cc", |
+ ] |
+ deps = [ |
+ "//webrtc/base:rtc_base_approved", |
+ "//webrtc/pc:rtc_pc", |
+ "//webrtc/system_wrappers:field_trial_default", |
+ "//webrtc/system_wrappers:metrics_default", |
+ ] |
+ if (is_clang) { |
+ # Suppress warnings from the Chromium Clang plugin. |
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
+ configs -= [ "//build/config/clang:find_bad_constructs" ] |
+ } |
+ } |
+ executable("turnserver") { |
+ sources = [ |
+ "turnserver/turnserver_main.cc", |
+ ] |
+ deps = [ |
+ "//webrtc/base:rtc_base_approved", |
+ "//webrtc/pc:rtc_pc", |
+ "//webrtc/system_wrappers:field_trial_default", |
+ "//webrtc/system_wrappers:metrics_default", |
+ ] |
+ if (is_clang) { |
+ # Suppress warnings from the Chromium Clang plugin. |
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
+ configs -= [ "//build/config/clang:find_bad_constructs" ] |
+ } |
+ } |
+ executable("stunserver") { |
+ sources = [ |
+ "stunserver/stunserver_main.cc", |
+ ] |
+ deps = [ |
+ "//webrtc/base:rtc_base_approved", |
+ "//webrtc/pc:rtc_pc", |
+ "//webrtc/system_wrappers:field_trial_default", |
+ "//webrtc/system_wrappers:metrics_default", |
+ ] |
+ if (is_clang) { |
+ # Suppress warnings from the Chromium Clang plugin. |
+ # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
+ configs -= [ "//build/config/clang:find_bad_constructs" ] |
+ } |
+ } |
+} |