Skip to content

Commit

Permalink
Error when FFMPEG_PKG_CONFIG_PATH not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm0 committed Dec 29, 2023
1 parent 1963116 commit ee89358
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ fn static_linking(env_vars: &EnvVars) {
use non_windows::*;
// Hint: set PKG_CONFIG_PATH to some placeholder value will let pkg_config probing system library.
if let Some(ffmpeg_pkg_config_path) = env_vars.ffmpeg_pkg_config_path.as_ref() {
if !Path::new(ffmpeg_pkg_config_path).exists() {
panic!(
"error: FFMPEG_PKG_CONFIG_PATH is set to `{}`, which does not exist.",
ffmpeg_pkg_config_path
);
}
env::set_var("PKG_CONFIG_PATH", ffmpeg_pkg_config_path);
link_and_bindgen(env_vars, output_binding_path);
} else if let Some(ffmpeg_libs_dir) = env_vars.ffmpeg_libs_dir.as_ref() {
Expand Down

0 comments on commit ee89358

Please sign in to comment.