fn main() {
#[cfg(feature = "turbojpeg")]
{
#[cfg(target_os = "macos")]
{
if std::path::Path::new("/opt/homebrew/opt/jpeg-turbo/lib").exists() {
println!("cargo:rustc-link-search=native=/opt/homebrew/opt/jpeg-turbo/lib");
}
else if std::path::Path::new("/usr/local/opt/jpeg-turbo/lib").exists() {
println!("cargo:rustc-link-search=native=/usr/local/opt/jpeg-turbo/lib");
}
}
#[cfg(target_os = "windows")]
{
if let Ok(vcpkg_root) = std::env::var("VCPKG_ROOT") {
let lib_path = format!("{}/installed/x64-windows/lib", vcpkg_root);
if std::path::Path::new(&lib_path).exists() {
println!("cargo:rustc-link-search=native={}", lib_path);
}
}
}
}
}