Skip to content

Commit

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

* Add .change file.

* Update macos-crosscompile.md

Co-authored-by: Ngo Iok Ui (Wu Yu Wei) <yuweiwu@pm.me>
  • Loading branch information
dvc94ch and wusyong committed Oct 25, 2022
1 parent d15a756 commit 2edc741
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changes/macos-crosscompile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tao": patch
---

Support cross compiling for macos from a non macos host.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ default = [ ]
dox = [ "gtk/dox" ]
tray = [ "libappindicator", "dirs-next" ]

[build-dependencies]
cc = "1"

[dependencies]
instant = "0.1"
lazy_static = "1"
Expand Down Expand Up @@ -64,9 +67,6 @@ dispatch = "0.2"
scopeguard = "1.1"
png = "0.17"

[target."cfg(target_os = \"macos\")".build-dependencies]
cc = "1"

[target."cfg(target_os = \"windows\")".dependencies]
parking_lot = "0.12"
unicode-segmentation = "1.10.0"
Expand Down
1 change: 0 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ fn main() {
println!("cargo:rustc-cfg=use_colorsync_cgdisplaycreateuuidfromdisplayid");
}
// link carbon hotkey on macOS
#[cfg(target_os = "macos")]
{
if std::env::var("CARGO_CFG_TARGET_OS").map_or(false, |os| os == "macos") {
println!("cargo:rustc-link-lib=framework=Carbon");
Expand Down

0 comments on commit 2edc741

Please sign in to comment.