mirror of
https://github.com/encounter/rust-ffmpeg-zmwangx.git
synced 2026-07-10 21:18:40 -07:00
build: handle static feature flag
This commit is contained in:
+3
-1
@@ -343,6 +343,8 @@ fn check_features(ffmpeg: Library,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let statik = env::var("CARGO_FEATURE_STATIC").is_ok();
|
||||
|
||||
let ffmpeg: Library = if env::var("CARGO_FEATURE_BUILD").is_ok() {
|
||||
println!("cargo:rustc-link-search=native={}", search().join("lib").to_string_lossy());
|
||||
|
||||
@@ -383,7 +385,7 @@ fn main() {
|
||||
}
|
||||
} else {
|
||||
pkg_config::Config::new()
|
||||
// .statik(true)
|
||||
.statik(statik)
|
||||
.probe("libavcodec").unwrap().into()
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user