mirror of
https://github.com/GuillemCastro/spotify-dl.git
synced 2024-11-25 03:20:27 +01:00
Add custom build file
This commit is contained in:
parent
d9a8606221
commit
7e341f7a04
2 changed files with 16 additions and 0 deletions
|
@ -3,6 +3,7 @@ name = "spotify-dl"
|
|||
version = "0.1.0"
|
||||
authors = ["Guillem Castro <guillemcastro4@gmail.com>"]
|
||||
edition = "2018"
|
||||
links = "FLAC"
|
||||
|
||||
[dependencies]
|
||||
librespot = { path = "./librespot" }
|
||||
|
@ -18,3 +19,6 @@ version = "0.2.0"
|
|||
|
||||
[package.metadata.deb]
|
||||
depends="libflac-dev"
|
||||
|
||||
[build-dependencies]
|
||||
pkg-config = "0.3.16"
|
12
build.rs
Normal file
12
build.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
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");
|
||||
}
|
Loading…
Reference in a new issue