From e5cd505d7cc5099e3aed6b5e73d8f002a36aa39c Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 8 Oct 2024 22:24:22 +0800 Subject: [PATCH] fix: fix macOS build --- CMakeLists.txt | 4 ++-- build.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d4c107..fc94be0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,8 +62,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL endif() if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_BUILD_TYPE STREQUAL "Release") - set(EXECUTORCH_CMAKE_ARGS - "${EXECUTORCH_CMAKE_ARGS} -DEXECUTORCH_BUILD_COREML=ON") + list(APPEND EXECUTORCH_CMAKE_ARGS + -DEXECUTORCH_BUILD_COREML=ON) endif() if(CMAKE_BUILD_TYPE STREQUAL "Release") diff --git a/build.rs b/build.rs index 5033d8c..40079e0 100644 --- a/build.rs +++ b/build.rs @@ -87,9 +87,9 @@ fn main() { if node_platform == "darwin" { link_whole("coremldelegate"); link("sqlite3"); - println!("cargo:rustc-link-arg=-framework Foundation"); - println!("cargo:rustc-link-arg=-framework CoreML"); - println!("cargo:rustc-link-arg=-framework Accelerate"); + println!("cargo:rustc-link-lib=framework=Foundation"); + println!("cargo:rustc-link-lib=framework=CoreML"); + println!("cargo:rustc-link-lib=framework=Accelerate"); } // QNN