From 446251d1d57670a3e21eaf5c4f4884efaf2840b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marijan=20Petri=C4=8Devi=C4=87?= Date: Fri, 6 Sep 2024 17:11:24 +0200 Subject: [PATCH] build.rs: make wit root configurable with an env-var --- build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 3e85e46..fcf7c42 100644 --- a/build.rs +++ b/build.rs @@ -5,7 +5,9 @@ use std::path::PathBuf; fn main() { let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); - let golem_wit_root = PathBuf::from(find_package_root("golem-wit")); + let golem_wit_root = PathBuf::from( + env::var("GOLEM_WIT_ROOT").unwrap_or_else(|_| find_package_root("golem-wit")), + ); println!("cargo:warning=Output dir: {out_dir:?}"); println!("cargo:warning=Golem WIT root: {golem_wit_root:?}");