diff --git a/Cargo.toml b/Cargo.toml index a41e3fa..3c2f7ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "openvr_sys" -version = "2.0.3" +version = "2.0.4" authors = [ "Colin Sherratt", "Erick Tryzelaar", "Rene Eichhorn", - "Benjamin Saunders" + "Benjamin Saunders", + "TiberiusCN" ] license = "MIT" description = "Raw unsafe system binding for openvr" diff --git a/build.rs b/build.rs index 1279a2c..4dd3fbd 100644 --- a/build.rs +++ b/build.rs @@ -13,7 +13,12 @@ fn main() { config.define("BUILD_UNIVERSAL", "OFF"); } else if target_os == "windows" { // Work around broken cmake build. - config.cxxflag("/DWIN32"); + if "gnu" == env::var("CARGO_CFG_TARGET_ENV").unwrap() { + config.cxxflag("-DWIN32"); + println!("cargo:rustc-link-lib=dylib=stdc++"); + } else { + config.cxxflag("/DWIN32"); + } } let dst = config.build(); diff --git a/openvr b/openvr index 02bc73b..52065df 160000 --- a/openvr +++ b/openvr @@ -1 +1 @@ -Subproject commit 02bc73b9bcfe9cc2d2802bd5fdc91f724de8ef10 +Subproject commit 52065df3d6f3af96300dac98cdf7397f26abfcd7