From 799cc513267257218ee0475187195a610dc3119c Mon Sep 17 00:00:00 2001 From: Yuri Khrustalev Date: Thu, 12 Dec 2024 15:05:40 -0500 Subject: [PATCH] Add a way to force the macos target in case it is set --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfab093..0dc2012 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,11 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") if (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") set(TOKENIZERS_CPP_CARGO_TARGET aarch64-apple-darwin) endif() + if (CMAKE_OSX_DEPLOYMENT_TARGET) + set(CARGO_EXTRA_ENVS + MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} + ) + endif() elseif (CMAKE_SYSTEM_NAME STREQUAL "Android") if (ANDROID_ABI STREQUAL "arm64-v8a") set(TOKENIZERS_CPP_CARGO_TARGET aarch64-linux-android)