From f054819e257a4f9cbb7fa82ba51dc2335f4359ec Mon Sep 17 00:00:00 2001 From: tfarina Date: Mon, 26 Oct 2015 05:15:27 -0700 Subject: [PATCH] Add GN Build file for rtc_sound target. Tested on Linux with the following command lines: $ gn gen out-gn/Release --args='is_debug=false target_cpu="x64" build_with_chromium=false' $ ninja -C out-gn/Release rtc_sound BUG=webrtc:4160 R=kjellander@webrtc.org Review URL: https://codereview.webrtc.org/1425583002 Cr-Commit-Position: refs/heads/master@{#10405} --- webrtc/BUILD.gn | 3 ++- webrtc/sound/BUILD.gn | 55 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 webrtc/sound/BUILD.gn diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index ac14d7d528..c8b7ea04ab 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -178,8 +178,8 @@ source_set("webrtc") { public_configs = [ ":common_inherited_config" ] deps = [ - "audio", ":webrtc_common", + "audio", "base:rtc_base", "call", "common_audio", @@ -195,6 +195,7 @@ source_set("webrtc") { "modules/utility", "modules/video_coding", "modules/video_processing", + "sound:rtc_sound", "system_wrappers", "tools", "video", diff --git a/webrtc/sound/BUILD.gn b/webrtc/sound/BUILD.gn new file mode 100644 index 0000000000..82bfdd104e --- /dev/null +++ b/webrtc/sound/BUILD.gn @@ -0,0 +1,55 @@ +# Copyright 2015 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. +import("../build/webrtc.gni") + +static_library("rtc_sound") { + sources = [ + "automaticallychosensoundsystem.h", + "nullsoundsystem.cc", + "nullsoundsystem.h", + "nullsoundsystemfactory.cc", + "nullsoundsystemfactory.h", + "platformsoundsystem.cc", + "platformsoundsystem.h", + "platformsoundsystemfactory.cc", + "platformsoundsystemfactory.h", + "sounddevicelocator.h", + "soundinputstreaminterface.h", + "soundoutputstreaminterface.h", + "soundsystemfactory.h", + "soundsysteminterface.cc", + "soundsysteminterface.h", + "soundsystemproxy.cc", + "soundsystemproxy.h", + ] + + if (is_clang) { + # Suppress warnings from Chrome's Clang plugins. + # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. + configs -= [ "//build/config/clang:find_bad_constructs" ] + } + + deps = [ + "//webrtc/base:rtc_base", + ] + + if (is_linux) { + sources += [ + "alsasoundsystem.cc", + "alsasoundsystem.h", + "alsasymboltable.cc", + "alsasymboltable.h", + "linuxsoundsystem.cc", + "linuxsoundsystem.h", + "pulseaudiosoundsystem.cc", + "pulseaudiosoundsystem.h", + "pulseaudiosymboltable.cc", + "pulseaudiosymboltable.h", + ] + } +}