summary refs log tree commit diff
path: root/build.rs
blob: 8113d1c15b7d114f9bebf5bb78f2604b885e0ed7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn main() {
    if std::env::var_os("PKGDATADIR").is_none() {
        println!("cargo::rustc-env=PKGDATADIR={}", {
            let mut path = std::path::PathBuf::from(std::env::var_os("OUTDIR").unwrap());
            path.push("share");
            path
        }.display())
    }

    if std::env::var_os("LOCALEDIR").is_none() {
        println!("cargo::rustc-env=PKGDATADIR={}", {
            let mut path = std::path::PathBuf::from(std::env::var_os("OUTDIR").unwrap());
            path.push("locale");
            path
        }.display())
    }
}