Skip to content

Commit

Permalink
[feat] Use libjpeg-turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
uttarayan21 committed Feb 5, 2024
1 parent 350dfce commit ceae875
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"libraw-rs",
"libraw-sys",
Expand Down
6 changes: 4 additions & 2 deletions libraw-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ links = "raw_r"
libc = "0.2.123"
libz-sys = { version = "1.1.8", optional = true, features = ["static"], default-features = false }
# We want to switch out to libjpeg-turbo but currently the build system depends cmake and doesn't build on windows for some reason
mozjpeg-sys = { git = "https://github.com/uttarayan21/mozjpeg-sys.git", optional = true, features = ["jpeg80_abi"] }
# mozjpeg-sys = { path = "/Users/fs0c131y/Projects/aftershoot/mozjpeg-sys", optional = true, features = ["jpeg80_abi", "nasm_simd", "with_simd", "nasm_simd_parallel_build", "parallel"] }
# libjpeg-sys = { git = "https://github.com/aftershootco/libjpeg-sys", optional = true }
libjpeg-sys = { path = "/Users/fs0c131y/Projects/aftershoot/libjpeg-sys", optional = true }
openmp-sys = { version = "1.2.3", optional = true }

[build-dependencies]
Expand All @@ -31,6 +33,6 @@ default = ["jpeg", "zlib", "bindgen"]
bindgen = ["dep:bindgen"]
copy = []
zlib = ["dep:libz-sys"]
jpeg = ["dep:mozjpeg-sys"]
jpeg = ["dep:libjpeg-sys"]
openmp = ["dep:openmp-sys"]
openmp_static = ["openmp", "openmp-sys?/static"]
2 changes: 1 addition & 1 deletion libraw-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ fn build(out_dir: impl AsRef<Path>, libraw_dir: impl AsRef<Path>) -> Result<()>
);
println!("cargo:rustc-link-lib=static=raw_r");
#[cfg(feature = "jpeg")]
println!("cargo:rustc-link-lib=static=mozjpeg80");
println!("cargo:rustc-link-lib=static=jpeg");
#[cfg(feature = "zlib")]
println!("cargo:rustc-link-lib=static=z");

Expand Down

0 comments on commit ceae875

Please sign in to comment.