1 // Copyright 2022 The ChromiumOS Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 use pkg_config::Config; 6 main()7fn main() { 8 // Skip building dependencies when generating documents. 9 if std::env::var("CARGO_DOC").is_ok() { 10 return; 11 } 12 13 // ffmpeg is currently only supported on unix 14 if std::env::var("CARGO_CFG_UNIX").is_err() { 15 return; 16 } 17 18 // Match all ffmpeg 5.0 versions with which our generated bindings are compatible. 19 Config::new() 20 .range_version("59".."60") 21 .probe("libavcodec") 22 .unwrap(); 23 Config::new() 24 .range_version("57".."58") 25 .probe("libavutil") 26 .unwrap(); 27 Config::new() 28 .range_version("6".."7") 29 .probe("libswscale") 30 .unwrap(); 31 } 32