mirror of
https://github.com/encounter/rust-ffmpeg.git
synced 2026-07-10 21:18:39 -07:00
cargo: don't build when it's not set
This commit is contained in:
+3
-3
@@ -19,9 +19,9 @@ default = ["avcodec", "avdevice", "avfilter", "avformat", "avresample", "swresa
|
||||
static = []
|
||||
|
||||
build = ["static"]
|
||||
build-gpl = []
|
||||
build-nonfree = []
|
||||
build-version3 = []
|
||||
build-gpl = ["build"]
|
||||
build-nonfree = ["build"]
|
||||
build-version3 = ["build"]
|
||||
|
||||
avcodec = []
|
||||
avdevice = ["avformat"]
|
||||
|
||||
@@ -231,6 +231,10 @@ fn build() -> io::Result<()> {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
if env::var("CARGO_FEATURE_BUILD").is_err() {
|
||||
return;
|
||||
}
|
||||
|
||||
println!("cargo:rustc-link-search=native={}", search().join("lib").to_string_lossy());
|
||||
|
||||
if fs::metadata(&search().join("lib").join("libavutil.a")).is_ok() {
|
||||
|
||||
Reference in New Issue
Block a user