diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index 4b5b695b0..839658149 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -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 diff --git a/build.rs b/build.rs index 85f21e7d0..7ff8f9ef6 100644 --- a/build.rs +++ b/build.rs @@ -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"); }