From 1cfd8614cef2a5348586803079a4a4bbd17e66c7 Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 1 Sep 2024 21:07:42 +0300 Subject: Fix build script --- build.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 build.rs diff --git a/build.rs b/build.rs old mode 100644 new mode 100755 index 8113d1c..e3491bb --- a/build.rs +++ b/build.rs @@ -1,15 +1,18 @@ 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("OUTDIR").unwrap()); + 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=PKGDATADIR={}", { - let mut path = std::path::PathBuf::from(std::env::var_os("OUTDIR").unwrap()); + println!("cargo::rustc-env=LOCALEDIR={}", { + let mut path = std::path::PathBuf::from(std::env::var_os("OUT_DIR").unwrap()); path.push("locale"); path }.display()) -- cgit 1.4.1