final release preparations
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
use std::{env, path::PathBuf};
|
||||
|
||||
pub const ENV_KEY_CSP_CONFIG_DIR: &str = "CSP_CONFIG_DIR";
|
||||
pub const ENV_KEY_TEST: &str = "RUN_TESTS";
|
||||
|
||||
fn main() {
|
||||
println!("cargo:rustc-link-lib=csp");
|
||||
// libcsp is built in a separate project, so linking it for tests will fail.
|
||||
// For tests, we do not want to have the link directive to csp.
|
||||
let run_tests = if let Ok(val) = env::var(ENV_KEY_TEST) {
|
||||
val == "1"
|
||||
} else {
|
||||
false
|
||||
};
|
||||
if !run_tests {
|
||||
println!("cargo:rustc-link-lib=csp");
|
||||
}
|
||||
|
||||
let out_path = env::var("OUT_DIR").unwrap();
|
||||
let csp_conf_dir = match env::var(ENV_KEY_CSP_CONFIG_DIR) {
|
||||
|
Reference in New Issue
Block a user