Skip to content

Commit c52987c

Browse files
committed
Force static linking of hdf5
1 parent cde154e commit c52987c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

netcdf-src/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dap = ["dep:link-cplusplus"]
3333
mpi = []
3434

3535
[dependencies]
36-
hdf5-sys = { workspace = true, features = ["hl", "deprecated", "zlib"] }
36+
hdf5-sys = { workspace = true, features = ["hl", "deprecated", "zlib", "static"] }
3737
libz-sys = { version = "1.0.25" }
3838
link-cplusplus = { version = "1.0.9", optional = true }
3939

netcdf-src/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ fn main() {
2626
.define("PLUGIN_INSTALL_DIR", "OFF")
2727
//
2828
.define("HDF5_ROOT", &hdf5_root)
29+
.define("HDF5_USE_STATIC_LIBRARIES", "ON")
2930
//
3031
.define("NETCDF_ENABLE_LIBXML2", "OFF") // Use bundled xml2
3132
//

0 commit comments

Comments
 (0)