From 1d0e68a2da6b5922102c27d7998fd23e740da943 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sat, 21 Sep 2019 18:06:48 -0400 Subject: [PATCH] Add extra Windows SDK static libs --- aeron_driver-sys/build.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/aeron_driver-sys/build.rs b/aeron_driver-sys/build.rs index 11fa3e6..778d414 100644 --- a/aeron_driver-sys/build.rs +++ b/aeron_driver-sys/build.rs @@ -46,6 +46,19 @@ pub fn main() { link_type.link_lib(), link_type.target_name() ); + + match link_type { + LinkType::Static => { + // On Windows, there are some extra libraries needed for static link + // that aren't included by Aeron. + if cfg!(target_os = "windows") { + println!("cargo:rustc-link-lib=shell32"); + println!("cargo:rustc-link-lib=iphlpapi"); + } + }, + _ => () + }; + let cmake_output = Config::new(&aeron_path) .build_target(link_type.target_name()) .build();