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 if (is_android) { | 9 if (is_android) { |
10 import("//build/config/android/config.gni") | 10 import("//build/config/android/config.gni") |
11 import("//build/config/android/rules.gni") | 11 import("//build/config/android/rules.gni") |
12 } else if (is_mac) { | 12 } else if (is_mac) { |
13 import("//build/config/mac/rules.gni") | 13 import("//build/config/mac/rules.gni") |
14 } else if (is_ios) { | 14 } else if (is_ios) { |
15 import("//build/config/ios/rules.gni") | 15 import("//build/config/ios/rules.gni") |
16 } | 16 } |
17 if (is_linux || is_win) { | |
18 import("//webrtc/build/webrtc.gni") | |
19 } | |
20 if (is_linux) { | |
21 import("//build/config/linux/pkg_config.gni") | |
22 } | |
17 | 23 |
18 group("examples") { | 24 group("examples") { |
19 deps = [] | 25 deps = [] |
20 | 26 |
21 if (is_android) { | 27 if (is_android) { |
22 deps += [ ":AppRTCDemo" ] | 28 deps += [ ":AppRTCDemo" ] |
23 } | 29 } |
30 if (is_linux) { | |
31 deps += [ | |
32 ":peerconnection_client", | |
33 ":peerconnection_server", | |
34 ":relayserver", | |
35 ":stunserver", | |
36 ":turnserver", | |
37 ] | |
38 } | |
24 } | 39 } |
25 | 40 |
26 if (is_android) { | 41 if (is_android) { |
27 android_apk("AppRTCDemo") { | 42 android_apk("AppRTCDemo") { |
28 apk_name = "AppRTCDemo" | 43 apk_name = "AppRTCDemo" |
29 android_manifest = "androidapp/AndroidManifest.xml" | 44 android_manifest = "androidapp/AndroidManifest.xml" |
30 | 45 |
31 deps = [ | 46 deps = [ |
32 ":AppRTCDemo_javalib", | 47 ":AppRTCDemo_javalib", |
33 ":AppRTCDemo_resources", | 48 ":AppRTCDemo_resources", |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
357 "..:common_inherited_config", | 372 "..:common_inherited_config", |
358 ":socketrocket_include_config", | 373 ":socketrocket_include_config", |
359 ] | 374 ] |
360 | 375 |
361 libs = [ | 376 libs = [ |
362 "CFNetwork.framework", | 377 "CFNetwork.framework", |
363 "icucore", | 378 "icucore", |
364 ] | 379 ] |
365 } | 380 } |
366 } | 381 } |
382 | |
383 if (is_linux || is_win) { | |
384 if (is_linux) { | |
tommi
2016/08/08 13:17:18
seems like we have several of these checks repeate
| |
385 pkg_config("gtk2_config") { | |
386 # Gtk requires gmodule, but it does not list it as a dependency in some | |
387 # misconfigured systems. | |
388 packages = [ | |
389 "gmodule-2.0", | |
390 "gtk+-2.0", | |
391 "gthread-2.0", | |
392 ] | |
393 } | |
394 } | |
395 | |
396 executable("peerconnection_client") { | |
397 sources = [ | |
398 "peerconnection/client/conductor.cc", | |
399 "peerconnection/client/conductor.h", | |
400 "peerconnection/client/defaults.cc", | |
401 "peerconnection/client/defaults.h", | |
402 "peerconnection/client/peer_connection_client.cc", | |
403 "peerconnection/client/peer_connection_client.h", | |
404 ] | |
405 if (is_clang) { | |
406 # Suppress warnings from the Chromium Clang plugin. | |
407 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | |
408 configs -= [ "//build/config/clang:find_bad_constructs" ] | |
409 } | |
410 if (is_win) { | |
411 sources += [ | |
412 "peerconnection/client/flagdefs.h", | |
413 "peerconnection/client/main.cc", | |
414 "peerconnection/client/main_wnd.cc", | |
415 "peerconnection/client/main_wnd.h", | |
416 ] | |
417 cflags = [ "/wd4245" ] | |
418 configs += [ "//build/config/win:windowed" ] | |
419 } | |
420 if (is_linux) { | |
421 sources += [ | |
422 "peerconnection/client/linux/main.cc", | |
423 "peerconnection/client/linux/main_wnd.cc", | |
424 "peerconnection/client/linux/main_wnd.h", | |
425 ] | |
426 libs = [ | |
427 "X11", | |
428 "Xcomposite", | |
429 "Xext", | |
430 "Xrender", | |
431 ] | |
432 public_configs = [ ":gtk2_config" ] | |
433 } | |
434 deps = [ | |
435 "//webrtc/api:libjingle_peerconnection", | |
436 "//webrtc/system_wrappers:field_trial_default", | |
437 "//webrtc/system_wrappers:metrics_default", | |
438 ] | |
439 if (rtc_build_json) { | |
440 deps += [ "//third_party/jsoncpp" ] | |
441 } | |
442 } | |
443 executable("peerconnection_server") { | |
444 sources = [ | |
445 "peerconnection/server/data_socket.cc", | |
446 "peerconnection/server/data_socket.h", | |
447 "peerconnection/server/main.cc", | |
448 "peerconnection/server/peer_channel.cc", | |
449 "peerconnection/server/peer_channel.h", | |
450 "peerconnection/server/utils.cc", | |
451 "peerconnection/server/utils.h", | |
452 ] | |
453 deps = [ | |
454 "//webrtc:webrtc_common", | |
455 "//webrtc/base:rtc_base_approved", | |
456 "//webrtc/tools:command_line_parser", | |
457 ] | |
458 if (is_clang) { | |
459 # Suppress warnings from the Chromium Clang plugin. | |
460 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | |
461 configs -= [ "//build/config/clang:find_bad_constructs" ] | |
462 } | |
463 } | |
464 executable("relayserver") { | |
465 sources = [ | |
466 "relayserver/relayserver_main.cc", | |
467 ] | |
468 deps = [ | |
469 "//webrtc/base:rtc_base_approved", | |
470 "//webrtc/pc:rtc_pc", | |
471 "//webrtc/system_wrappers:field_trial_default", | |
472 "//webrtc/system_wrappers:metrics_default", | |
473 ] | |
474 if (is_clang) { | |
475 # Suppress warnings from the Chromium Clang plugin. | |
476 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | |
477 configs -= [ "//build/config/clang:find_bad_constructs" ] | |
478 } | |
479 } | |
480 executable("turnserver") { | |
481 sources = [ | |
482 "turnserver/turnserver_main.cc", | |
483 ] | |
484 deps = [ | |
485 "//webrtc/base:rtc_base_approved", | |
486 "//webrtc/pc:rtc_pc", | |
487 "//webrtc/system_wrappers:field_trial_default", | |
488 "//webrtc/system_wrappers:metrics_default", | |
489 ] | |
490 if (is_clang) { | |
491 # Suppress warnings from the Chromium Clang plugin. | |
492 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | |
493 configs -= [ "//build/config/clang:find_bad_constructs" ] | |
494 } | |
495 } | |
496 executable("stunserver") { | |
497 sources = [ | |
498 "stunserver/stunserver_main.cc", | |
499 ] | |
500 deps = [ | |
501 "//webrtc/base:rtc_base_approved", | |
502 "//webrtc/pc:rtc_pc", | |
503 "//webrtc/system_wrappers:field_trial_default", | |
504 "//webrtc/system_wrappers:metrics_default", | |
505 ] | |
506 if (is_clang) { | |
507 # Suppress warnings from the Chromium Clang plugin. | |
508 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | |
509 configs -= [ "//build/config/clang:find_bad_constructs" ] | |
510 } | |
511 } | |
512 } | |
OLD | NEW |