Implement optional JPEG2000 codec adapter (#40)
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

This commit is contained in:
2026-08-09 03:42:18 +00:00
parent 5d1573fc82
commit 16501f2331
24 changed files with 2776 additions and 53 deletions

View File

@@ -0,0 +1,16 @@
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");
}
}