mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
2efb19303d
This crate has been copied upstream verbatim. This crate is used as an audio backend for playback (capture has not been implemented yet). The next CLs are will upstream the usage of win_audio. Bug: 232462411 Test: built and presubmits (although this crate won't be built locally or presubmits yet) Change-Id: Iae374b2b575fbd19b016cae403a00024896cba56 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3694097 Commit-Queue: Richard Zhang <rizhang@google.com> Reviewed-by: Noah Gold <nkgold@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
38 lines
1.2 KiB
Rust
38 lines
1.2 KiB
Rust
// Copyright 2022 The Chromium OS Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
fn main() {
|
|
#[cfg(windows)]
|
|
{
|
|
use std::env;
|
|
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
|
println!("cargo:rustc-link-lib=static=r8brain");
|
|
#[cfg(debug_assertions)]
|
|
{
|
|
let dll_dir = format!(
|
|
r#"{}\..\..\..\third_party\r8brain\r8brain\x64\Debug\"#,
|
|
manifest_dir
|
|
);
|
|
println!(r#"cargo:rustc-link-search={}"#, dll_dir);
|
|
println!(
|
|
r#"cargo:rustc-env=PATH={};{}"#,
|
|
env::var("PATH").unwrap(),
|
|
dll_dir
|
|
);
|
|
}
|
|
#[cfg(not(debug_assertions))]
|
|
{
|
|
let dll_dir = format!(
|
|
r#"{}\..\..\..\third_party\r8brain\r8brain\x64\Release\"#,
|
|
manifest_dir
|
|
);
|
|
println!(r#"cargo:rustc-link-search={}"#, dll_dir);
|
|
println!(
|
|
r#"cargo:rustc-env=PATH={};{}"#,
|
|
env::var("PATH").unwrap(),
|
|
dll_dir
|
|
);
|
|
}
|
|
}
|
|
}
|