Skip to content

Commit

Permalink
Merge pull request #65 from marijanp/wit-root-env-var
Browse files Browse the repository at this point in the history
build.rs: make WIT root configurable with an env-var
  • Loading branch information
vigoo authored Sep 20, 2024
2 parents 5dcdae6 + 446251d commit ddb7a85
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 ddb7a85

Please sign in to comment.