Index: chrome/chrome_browser.gypi |
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi |
index a852e955b8fc85aeb3fbb1085dcf38336dc9edf1..b95d52c66150e8df16ec985e79d48d5f4691620c 100644 |
--- a/chrome/chrome_browser.gypi |
+++ b/chrome/chrome_browser.gypi |
@@ -402,6 +402,8 @@ |
'browser/chromeos/audio/audio_mixer.h', |
'browser/chromeos/audio/audio_mixer_alsa.cc', |
'browser/chromeos/audio/audio_mixer_alsa.h', |
+ 'browser/chromeos/audio/audio_mixer_cras.cc', |
+ 'browser/chromeos/audio/audio_mixer_cras.h', |
'browser/chromeos/background/desktop_background_observer.cc', |
'browser/chromeos/background/desktop_background_observer.h', |
'browser/chromeos/bluetooth/bluetooth_adapter.cc', |
@@ -4147,6 +4149,41 @@ |
['exclude', 'browser/ui/toolbar/wrench_menu_model_chromeos.cc'], |
], |
}, { # chromeos==1 |
+ 'variables': { |
+ 'conditions': [ |
+ ['sysroot!=""', { |
+ 'pkg-config': '../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"', |
+ }, { |
+ 'pkg-config': 'pkg-config' |
+ }], |
+ ], |
+ # Override to dynamically link the cras (ChromeOS audio) library. |
+ 'use_cras%': 0, |
+ }, |
+ 'conditions': [ |
+ ['use_cras==1', { |
+ 'cflags': [ |
+ '<!@(<(pkg-config) --cflags libcras)', |
+ ], |
+ 'link_settings': { |
+ 'libraries': [ |
+ '<!@(<(pkg-config) --libs libcras)', |
+ ], |
+ }, |
+ 'defines': [ |
+ 'USE_CRAS', |
+ ], |
+ 'sources/': [ |
+ ['exclude', '^browser/chromeos/audio/audio_mixer_alsa.cc'], |
+ ['exclude', '^browser/chromeos/audio/audio_mixer_alsa.h'], |
+ ], |
+ }, { # use_cras==0 |
+ 'sources/': [ |
+ ['exclude', '^browser/chromeos/audio/audio_mixer_cras.cc'], |
+ ['exclude', '^browser/chromeos/audio/audio_mixer_cras.h'], |
+ ], |
+ }], |
+ ], |
'dependencies': [ |
'../build/linux/system.gyp:dbus-glib', |
'../third_party/libevent/libevent.gyp:libevent', |