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)