2021-06-23 18:06:38 +00:00
|
|
|
// 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() {
|
2022-04-08 10:51:32 +00:00
|
|
|
// Skip installing dependencies when generating documents.
|
|
|
|
if std::env::var("CARGO_DOC").is_ok() {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-12-22 03:25:13 +00:00
|
|
|
#[allow(clippy::single_match)]
|
2021-06-23 18:06:38 +00:00
|
|
|
match pkg_config::probe_library("libvda") {
|
|
|
|
Ok(_) => (),
|
2021-12-22 03:25:13 +00:00
|
|
|
// 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")]
|
2021-06-23 18:06:38 +00:00
|
|
|
Err(e) => panic!("{}", e),
|
|
|
|
};
|
|
|
|
|
|
|
|
println!("cargo:rustc-link-lib=dylib=vda");
|
|
|
|
}
|