Skip to content

Commit

Permalink
Revert the build script
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturKovacs committed May 6, 2021
1 parent 42884ae commit 1b4a501
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::ffi::OsStr;
#[cfg(not(windows))]
fn main() {}

fn generate_windows_bindings() {
#[cfg(windows)]
fn main() {
windows::build!(
Windows::Win32::SystemServices::{PWSTR, S_OK},
Windows::Win32::WindowsProgramming::{
Expand Down Expand Up @@ -48,16 +50,3 @@ fn generate_windows_bindings() {
},
);
}

fn main() {
let targeting_windows = {
if let Some(target) = std::env::var_os("CARGO_CFG_TARGET_OS") {
target.as_os_str() == OsStr::new("windows")
} else {
false
}
};
if targeting_windows {
generate_windows_bindings();
}
}

0 comments on commit 1b4a501

Please sign in to comment.