cargo: don't build when it's not set

This commit is contained in:
meh
2023-05-24 21:49:22 +02:00
committed by Till Höppner
parent 7040aaf929
commit 8f63181087
2 changed files with 7 additions and 3 deletions
+3 -3
View File
@@ -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"]
+4
View File
@@ -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() {