Skip to content

Commit

Permalink
Update: Add emscripten scope to packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
spector-9 committed Aug 20, 2024
1 parent 8d3de9e commit 4a71093
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 48 deletions.
55 changes: 11 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions libraw-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,11 @@ fn build(
// thread safety
libraw.flag_if_supported("-pthread");

let os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
// Add libraries
libraw.flag("-DUSE_DNGSDK");
if os != "emscripten" {
libraw.flag("-DUSE_DNGSDK");
}

// Don't set if emscripten as rawspeed doesn't build on wasm yet
//#[cfg(any(
Expand All @@ -400,7 +403,8 @@ fn build(

libraw.flag("-DUSE_ZLIB");

#[cfg(all(not(target_arch = "wasm32"), not(target_os = "unknown")))]

if os != "emscripten"
{
libraw.flag("-DUSE_INTOPIX_CPU_CODEC");
libraw.flag("-DIPXCPUCODEC_LIB_STATIC");
Expand All @@ -424,7 +428,9 @@ fn build(
//))]
//println!("cargo:rustc-link-lib=static=rawspeed");

println!("cargo:rustc-link-lib=static=dng");
if os != "emscripten" {
println!("cargo:rustc-link-lib=static=dng");
}
println!("cargo:rustc-link-lib=static=jxl_threads");
println!("cargo:rustc-link-lib=static=jxl");
println!("cargo:rustc-link-lib=static=jxl_cms");
Expand All @@ -437,7 +443,8 @@ fn build(
println!("cargo:rustc-link-lib=static=pugixml");
println!("cargo:rustc-link-lib=static=XMP");

#[cfg(all(not(target_arch = "wasm32"), not(target_os = "unknown")))]

if os != "emscripten"
{
println!("cargo:rustc-link-lib=static=IpxCpuCodec_static");
}
Expand Down

0 comments on commit 4a71093

Please sign in to comment.