oodle: Fix building for target Windows
Some checks failed
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux

This commit is contained in:
Lucas Schwiderski 2023-11-08 09:43:50 +01:00
parent 5f43fd17ba
commit fc759c005d
Signed by: lucas
GPG key ID: AA12679AAA6DF4D8

View file

@ -6,9 +6,8 @@ use std::path::PathBuf;
fn main() {
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").expect("No CARGO_MANIFEST_DIR");
println!("cargo:rustc-link-search=native={}", &manifest_dir);
dbg!(&manifest_dir);
if std::env::var("CARGO_CFG_WINDOWS").is_ok() {
if std::env::var("CARGO_CFG_TARGET_FAMILY") == Ok(String::from("windows")) {
let lib_name = if cfg!(debug_assertions) {
"oo2core_win64_debug"
} else {
@ -17,7 +16,7 @@ fn main() {
println!("cargo:rustc-link-lib=static={}", lib_name);
} else {
println!("cargo:rustc-link-lib=static=oo2corelinux64");
println!("cargo:rustc-link-lib=stdc++")
println!("cargo:rustc-link-lib=stdc++");
}
println!("cargo:rerun-if-changed=oodle2.h");