• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
main()5 fn main() {
6     // Skip installing dependencies when generating documents.
7     if std::env::var("CARGO_DOC").is_ok() {
8         return;
9     }
10 
11     // libva is unix only
12     if std::env::var("CARGO_CFG_UNIX").is_err() {
13         return;
14     }
15 
16     match pkg_config::probe_library("libva") {
17         Ok(_) => (),
18         Err(e) => panic!("Libva not found: {}", e),
19     };
20 
21     println!("cargo:rustc-link-lib=dylib=va");
22     println!("cargo:rustc-link-lib=dylib=va-drm"); // for the vaGetDisplayDRM entrypoint
23 }
24