summary refs log tree commit diff
path: root/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/build.rs b/build.rs
new file mode 100644
index 0000000..8113d1c
--- /dev/null
+++ b/build.rs
@@ -0,0 +1,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())
+    }
+}