fix: macos compile

This commit is contained in:
Kingtous 2023-04-18 13:40:32 +08:00
parent f0b532426f
commit 021612e8be
2 changed files with 7 additions and 5 deletions

View File

@ -431,7 +431,7 @@ jobs:
VCPKG_ROOT: /opt/rustdesk_thirdparty_lib/vcpkg
run: |
rustup target add ${{ matrix.job.target }}
cargo build --release --target aarch64-apple-ios --lib
cargo build --features flutter --release --target aarch64-apple-ios --lib
- name: Build rustdesk
shell: bash

View File

@ -123,9 +123,11 @@ fn main() {
build_manifest();
#[cfg(windows)]
build_windows();
#[cfg(target_os = "macos")]
build_mac();
#[cfg(target_os = "macos")]
println!("cargo:rustc-link-lib=framework=ApplicationServices");
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
if target_os == "macos" {
#[cfg(target_os = "macos")]
build_mac();
println!("cargo:rustc-link-lib=framework=ApplicationServices");
}
println!("cargo:rerun-if-changed=build.rs");
}