spotify-dl/build.rs

13 lines
414 B
Rust
Raw Normal View History

2021-02-14 23:24:59 +01:00
use std::env;
use std::fs;
use std::path::Path;
fn main() {
let library = pkg_config::Config::new().probe("flac").unwrap();
let profile = env::var_os("PROFILE").unwrap();
let from = library.link_paths.get(0).unwrap().join("libFLAC.so");
let to = Path::new("target").join(profile).join("deps").join("libflac.so");
fs::copy(from, to).unwrap();
println!("cargo:rerun-if-changed=build.rs");
}