# cmake/toolchain-macos.cmake
# 交叉编译 → macOS (x86_64)
# 需要安装 osxcross：
#   https://github.com/tpoechtrager/osxcross
# 或使用 Apple 官方工具链（仅在 macOS 上原生编译）

set(CMAKE_SYSTEM_NAME Darwin)
set(CMAKE_SYSTEM_PROCESSOR x86_64)

set(CMAKE_C_COMPILER   x86_64-apple-darwin-clang)
set(CMAKE_CXX_COMPILER x86_64-apple-darwin-clang++)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
