editor/bass-sys/build.rs

30 lines
779 B
Rust
Raw Normal View History

2021-01-05 10:17:41 +00:00
use std::env;
use std::path::PathBuf;
2021-01-08 07:21:39 +00:00
#[cfg(target_os = "linux")]
fn load_bass() {
let mut project_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
project_dir.push("linux");
project_dir.push("bass24");
project_dir.push("x64");
println!("cargo:rustc-link-search={}", project_dir.to_str().unwrap());
println!("cargo:rustc-link-lib=bass");
}
#[cfg(target_os = "windows")]
fn load_bass() {
2021-01-05 10:17:41 +00:00
let mut project_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
2021-01-08 07:21:39 +00:00
project_dir.push("win");
2021-01-05 10:17:41 +00:00
project_dir.push("bass24");
project_dir.push("c");
project_dir.push("x64");
println!("cargo:rustc-link-search={}", project_dir.to_str().unwrap());
println!("cargo:rustc-link-lib=bass");
}
2021-01-08 07:21:39 +00:00
fn main() {
load_bass();
}