Skip to content

Commit

Permalink
Merge pull request #142 from mulimoen/issue/141
Browse files Browse the repository at this point in the history
Link bundled xml when dap requested
  • Loading branch information
mulimoen authored May 5, 2024
2 parents 9955511 + b0b03c3 commit 2101e3c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion netcdf-src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ exclude = [
]

[features]
dap = []
dap = ["dep:link-cplusplus"]

[dependencies]
hdf5-sys = { workspace = true, features = ["hl", "deprecated", "zlib"] }
libz-sys = { version = "1.0.25" }
link-cplusplus = { version = "1.0.9", optional = true }

[build-dependencies]
cmake = "0.1.44"
2 changes: 2 additions & 0 deletions netcdf-src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ fn main() {
.define("HDF5_HL_LIBRARY", &hdf5_hl_lib)
.define("HDF5_INCLUDE_DIR", hdf5_incdir)
//
.define("ENABLE_LIBXML2", "OFF") // Use bundled xml2
//
.define("ENABLE_PARALLEL4", "OFF") // TODO: Enable mpi support
//
.define("ENABLE_NCZARR", "OFF") // TODO: requires a bunch of deps
Expand Down
6 changes: 6 additions & 0 deletions netcdf-src/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
//! Dummy crate for building `netCDF` from source
//!
//! The current pinned version is 4.9.2

#[cfg(feature = "dap")]
extern crate link_cplusplus;

extern crate hdf5_sys;
extern crate libz_sys;
2 changes: 1 addition & 1 deletion netcdf-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ netcdf-src = { workspace = true, optional = true }
default = []
memio = []
static = ["libz-sys/static", "hdf5-sys/static", "hdf5-sys/hl", "hdf5-sys/deprecated", "hdf5-sys/zlib", "dep:netcdf-src", "curl-sys?/static-curl", "curl-sys?/static-ssl"]
dap = ["dep:curl-sys"]
dap = ["dep:curl-sys", "netcdf-src?/dap"]

[build-dependencies]
semver = "1.0.9"
Expand Down

0 comments on commit 2101e3c

Please sign in to comment.