-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.rs
30 lines (30 loc) · 1.19 KB
/
build.rs
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
27
28
29
30
fn main() {
#[cfg(target_os = "windows")]
winres::WindowsResource::new()
.set_icon("src/assets/sybil.ico")
.set_manifest(
r#"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
"#,
)
.compile()
.expect("failed to change icon");
println!("cargo:rerun-if-env-changed=OODLE");
println!(
"cargo:rustc-link-search={}",
std::env::var("OODLE").unwrap_or(
#[cfg(target_os = "windows")]
"C:/Program Files/Epic Games/UE_5.1/Engine/Source/Runtime/OodleDataCompression/Sdks/2.9.8/lib/Win64".to_string(),
#[cfg(target_os = "linux")]
"/mnt/c/Program Files/Epic Games/UE_5.1/Engine/Source/Runtime/OodleDataCompression/Sdks/2.9.8/lib/Linux".to_string(),
)
);
}