Skip to content

Commit

Permalink
build.rs: make wit root configurable with an env-var
Browse files Browse the repository at this point in the history
  • Loading branch information
marijanp committed Sep 10, 2024
1 parent 6f2c7f3 commit 446251d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:?}");
Expand Down

0 comments on commit 446251d

Please sign in to comment.