blob: e3491bb3de2ca638c1768448b53a7b8f0bf493bd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
fn main() {
println!("cargo::rerun-if-env-changed=PKGDATADIR");
println!("cargo::rerun-if-env-changed=LOCALEDIR");
println!("cargo::rerun-if-changed=./build.rs");
if std::env::var_os("PKGDATADIR").is_none() {
println!("cargo::rustc-env=PKGDATADIR={}", {
let mut path = std::path::PathBuf::from(std::env::var_os("OUT_DIR").unwrap());
path.push("share");
path
}.display())
}
if std::env::var_os("LOCALEDIR").is_none() {
println!("cargo::rustc-env=LOCALEDIR={}", {
let mut path = std::path::PathBuf::from(std::env::var_os("OUT_DIR").unwrap());
path.push("locale");
path
}.display())
}
}
|