Skip to content
This repository was archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
fix(windows-gnu): link with rpcrt4 and shlwapi (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
ordian authored Dec 27, 2018
1 parent 32b40e4 commit b3f2a42
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rocksdb-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ fn main() {
let target_os = env::var("CARGO_CFG_TARGET_OS").expect("CARGO_CFG_TARGET_OS is set by cargo.");
let target_env = env::var("CARGO_CFG_TARGET_ENV").expect("CARGO_CFG_TARGET_ENV is set by cargo.");

if target_env.contains("msvc") {
cfg.env("SNAPPY_INCLUDE", snappy);

if target_os.contains("windows") {
println!("cargo:rustc-link-lib=dylib={}", "rpcrt4");
println!("cargo:rustc-link-lib=dylib={}", "shlwapi");
}

if target_env.contains("msvc") {
cfg.env("SNAPPY_INCLUDE", snappy);

let features = env::var("CARGO_CFG_TARGET_FEATURE")
.expect("CARGO_CFG_TARGET_FEATURE is set by cargo.");
Expand Down

0 comments on commit b3f2a42

Please sign in to comment.