forked from comit-network/xmr-btc-swap
-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathbuild.rs
More file actions
26 lines (23 loc) · 950 Bytes
/
build.rs
File metadata and controls
26 lines (23 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
fn main() {
#[cfg(target_os = "windows")]
{
#[cfg(not(host_os = "linux"))]
{
panic!("Compiling for Windows is currently only supported from Linux (x86_64)");
}
// make sure the .dll's are exist -- else panic
if !["libstdc++-6.dll", "libgcc_s_seh-1.dll"]
.into_iter()
.all(|dll| std::path::Path::new(dll).try_exists().unwrap_or(false))
{
panic!(
"libstdc++-6.dll and libgcc_s_seh-1.dll don't exist in the src-tauri directory - run `just prepare-windows-build` to build them"
);
}
let home_dir = std::env::var("HOME").expect("HOME environment variable not set");
let lib_path = format!("{}/opt/gcc-mingw-14.3/x86_64-w64-mingw32/lib", home_dir);
println!("cargo:rustc-link-search=native={}", lib_path);
println!("cargo:rustc-link-lib=stdc++");
}
tauri_build::build();
}