From ca72a896dcbf631971a564413bd684bb637b747e Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Fri, 14 May 2021 18:35:40 -0600 Subject: pass tcl source dir forward, hopefully --- Cargo.toml | 1 + build.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6251462..0050fd5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,7 @@ name = "tcl-sys" version = "0.1.0" authors = ["Melody Horn "] edition = "2018" +links = "tcl" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/build.rs b/build.rs index 27736cd..4234c90 100644 --- a/build.rs +++ b/build.rs @@ -158,18 +158,21 @@ fn main() { let target_os = get_os_from_triple(target.as_str()).unwrap(); let tcl_source_path = download_tcl(); + println!("cargo:tcl-source={}", tcl_source_path.to_str().unwrap()); let tcl_compiled_path = compile_tcl(tcl_source_path.as_path(), target_os); let tcl_include_path = tcl_compiled_path.join("include"); let tcl_lib_path = tcl_compiled_path.join("lib"); - println!("cargo:rustc-link-search={}", tcl_lib_path.display()); + println!("cargo:rustc-link-search={}", tcl_lib_path.to_str().unwrap()); let include_paths = vec![String::from(tcl_include_path.to_str().unwrap())]; println!("cargo:include={}", include_paths.join(":")); generate_bindings(target.as_str(), host.as_str(), include_paths.as_slice()); link_tcl(target_os); + + println!("cargo:rerun-if-changed=build.rs"); } // headers_path is a list of directories where the Tcl headers are expected -- cgit v1.2.3