Debian Codegraph @

third_party/rust/winapi-i686-pc-windows-gnu/build.rs

raw
1 // Copyright © 2016-2018 winapi-rs developers
2 // Licensed under the Apache License, Version 2.0
3 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
4 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
5 // All files in the project carrying such notice may not be copied, modified, or distributed
6 // except according to those terms.
7 fn main() {
8 use std::env::var;
9 use std::path::Path;
10 println!("cargo:rerun-if-env-changed=WINAPI_NO_BUNDLED_LIBRARIES");
11 if var("WINAPI_NO_BUNDLED_LIBRARIES").is_ok() {
12 return;
13 }
14 if var("TARGET").map(|target| target == "i686-pc-windows-gnu").unwrap_or(false) {
15 let dir = var("CARGO_MANIFEST_DIR").unwrap();
16 println!("cargo:rustc-link-search=native={}", Path::new(&dir).join("lib").display());
17 }
18 }