crosvm/media/libvda/build.rs
Alexandre Courbot c7cd0e0114 Move libvda to media/libvda
As we are going to introduce more media-related crates, reserve the
"media" folder as a placeholder for them, starting with the existing
libvda.

BUG=b:169295147
BUG=b:214478588
TEST=cargo build --features "video-decoder,video-encoder,libvda"

Change-Id: I1b2ec65cbba8b735db3d19845c504546fa1c64ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3565623
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-04-06 01:19:07 +00:00

18 lines
616 B
Rust

// Copyright 2019 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() {
#[allow(clippy::single_match)]
match pkg_config::probe_library("libvda") {
Ok(_) => (),
// Ignore pkg-config failures on non-chromeos platforms to allow cargo-clippy to run even
// if libvda.pc doesn't exist.
#[cfg(not(feature = "chromeos"))]
Err(_) => (),
#[cfg(feature = "chromeos")]
Err(e) => panic!("{}", e),
};
println!("cargo:rustc-link-lib=dylib=vda");
}