1 2 3 4 5 6 7 8 9 10 11 12 13
use std::env; /// Set up the build environment by setting Cargo configuration variables. pub fn setup() { if cfg!(windows) { let debug = env::var("DEBUG").ok().map_or(false, |s| s == "true"); let configuration = if debug { "Debug" } else { "Release" }; let node_root_dir = env::var("DEP_NEON_RUNTIME_NODE_ROOT_DIR").unwrap(); let node_lib_file = env::var("DEP_NEON_RUNTIME_NODE_LIB_FILE").unwrap(); println!("cargo:rustc-link-search={}\\{}", node_root_dir, configuration); println!("cargo:rustc-link-lib={}", node_lib_file); } }