summaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2021-01-10 13:36:13 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2021-01-10 13:36:13 +0000
commit27b6f70a2e7556fc3012b173602d258f33cf0a7e (patch)
tree3864c5c51c9fadd6b25922d8d0aaf55bb10d29a6 /build.rs
parent437a2c87e85de43911eb04f721e0af9f3c67f4cf (diff)
downloadsubplot-27b6f70a2e7556fc3012b173602d258f33cf0a7e.tar.gz
resource: Use a fallback path if needed
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/build.rs b/build.rs
index 8687e94..7228ce0 100644
--- a/build.rs
+++ b/build.rs
@@ -84,8 +84,10 @@ fn write_out_resource_file<'a>(paths: impl Iterator<Item = &'a Path>) -> Result<
fn main() {
println!("cargo:rerun-if-env-changed=DEB_BUILD_OPTIONS");
let paths = if std::env::var("DEB_BUILD_OPTIONS").is_err() {
+ println!("cargo:rustc-env=FALLBACK_PATH=");
gather_share_files().expect("Unable to scan the share tree")
} else {
+ println!("cargo:rustc-env=FALLBACK_PATH=/usr/share/subplot");
vec![]
};
write_out_resource_file(paths.iter().map(PathBuf::as_path))