| 1 | // Copyright 2022 The ChromiumOS Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | fn main() { |
| 6 | // Do not require dependencies when generating docs. |
| 7 | if std::env::var("CARGO_DOC").is_ok() || std::env::var("DOCS_RS").is_ok() { |
| 8 | return; |
| 9 | } |
| 10 | |
| 11 | match pkg_config::probe_library("libva") { |
| 12 | Ok(_) => (), |
| 13 | Err(e) => panic!("libva not found: {}", e), |
| 14 | }; |
| 15 | |
| 16 | println!("cargo:rustc-link-lib=dylib=va"); |
| 17 | println!("cargo:rustc-link-lib=dylib=va-drm"); // for the vaGetDisplayDRM entrypoint |
| 18 | } |