Skip to content

Commit

Permalink
Fix cross compilation. (#731)
Browse files Browse the repository at this point in the history
* Fix cross compilation.

* Add .change file.
  • Loading branch information
dvc94ch authored Oct 29, 2022
1 parent e64ad21 commit cd08410
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changes/ios-crosscompile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": patch
---

Support cross compiling ios on a non macos host.
6 changes: 2 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
// SPDX-License-Identifier: MIT

fn main() {
let is_macos = std::env::var("TARGET")
.map(|t| t.ends_with("-darwin"))
.unwrap_or_default();
if is_macos {
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
if target_os == "macos" || target_os == "ios" {
println!("cargo:rustc-link-lib=framework=WebKit");
}

Expand Down

0 comments on commit cd08410

Please sign in to comment.