diff --git a/.travis.yml b/.travis.yml index ca7b19e..4384fb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ script: - cd aeron_driver-sys - cargo test - cargo test --release - #- cargo test --features "static" + - cargo test --features "static" - cd .. - cargo test diff --git a/aeron_driver-sys/build.rs b/aeron_driver-sys/build.rs index 11fa3e6..a5c1231 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();