Skip to content

Commit

Permalink
Merge pull request #12 from dougyau/feature-gate-charls
Browse files Browse the repository at this point in the history
Feature gate charls
  • Loading branch information
pevers authored Nov 28, 2022
2 parents 80ff01a + edb760c commit 07dc3cb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ strum_macros = "0.24.2"
[lib]
name = "gdcm_rs"
path = "src/lib.rs"

[features]
default = ["charls"]
charls = []
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ Rust bindings for [Grassroots DICOM (GDCM)](https://github.com/malaterre/GDCM).

The goal of this project is to provide an easy to use interface with GDCM.
This can be used to decode a wide variety of compressed DICOM objects.
### Feature Flags
* `charls` use built-in libcharls
4 changes: 3 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ fn build() {

// gdcm libs
println!("cargo:rustc-link-lib=static=gdcmMSFF");
println!("cargo:rustc-link-lib=static=gdcmcharls");
println!("cargo:rustc-link-lib=static=gdcmCommon");
println!("cargo:rustc-link-lib=static=gdcmDICT");
println!("cargo:rustc-link-lib=static=gdcmDSED");
Expand All @@ -53,6 +52,9 @@ fn build() {
println!("cargo:rustc-link-lib=static=gdcmMEXD");
println!("cargo:rustc-link-lib=static=gdcmzlib");

#[cfg(feature="charls")]
println!("cargo:rustc-link-lib=static=gdcmcharls");

// FIXME: OSX ONLY
println!("Building for {}", env::consts::OS);
match env::consts::OS {
Expand Down

0 comments on commit 07dc3cb

Please sign in to comment.