-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add static linking support for windows
- Loading branch information
1 parent
58b5a29
commit 3f99219
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#[cfg(all(windows, not(feature = "dynamic")))] | ||
fn main() { | ||
use std::{env, path::PathBuf}; | ||
if let Ok(path) = env::var("SCITER_STATIC_LIBRARY") { | ||
let lib_dir = PathBuf::from(path); | ||
println!("cargo:rustc-link-search=native={}", lib_dir.display()); | ||
println!("cargo:rustc-link-lib=static:-bundle={}", "sciter.static"); | ||
if cfg!(feature = "skia") { | ||
println!("cargo:rustc-link-lib=static:-bundle={}", "atls"); | ||
} | ||
println!("cargo:rustc-link-lib={}", "Comdlg32"); | ||
println!("cargo:rustc-link-lib={}", "windowscodecs"); | ||
println!("cargo:rustc-link-lib={}", "Wininet"); | ||
} else { | ||
println!("cargo:warning=Set SCITER_STATIC_LIBRARY to link static library"); | ||
} | ||
|
||
} | ||
|
||
#[cfg(not(all(windows, not(feature = "dynamic"))))] | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters