Files
Chili Palmer 16501f2331
Some checks failed
JPEG 2000 feature / linux (push) Has been cancelled
JPEG 2000 feature / macos (push) Has been cancelled
JPEG 2000 feature / windows (push) Has been cancelled
Implement optional JPEG2000 codec adapter (#40)
2026-08-09 03:42:18 +00:00

17 lines
529 B
Rust

use std::env;
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let target = env::var("TARGET").expect("Cargo provides TARGET");
if target.contains("msvc") {
vcpkg::Config::new()
.find_package("openjpeg")
.expect("jpeg2000 requires OpenJPEG 2.5.4 or newer from vcpkg");
} else {
pkg_config::Config::new()
.atleast_version("2.5.4")
.probe("libopenjp2")
.expect("jpeg2000 requires pkg-config and OpenJPEG 2.5.4 or newer");
}
}