1
0
mirror of https://github.com/bspeice/aeron-rs synced 2024-12-13 09:38:09 -05:00

Merge pull request #3 from bspeice/static

Enable static builds
This commit is contained in:
bspeice 2019-09-21 18:56:14 -04:00 committed by GitHub
commit 08485cb0d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -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();