aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml1
-rw-r--r--build.rs5
2 files changed, 5 insertions, 1 deletions
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 <melody@boringcactus.com>"]
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