Files
dynamics/cmake/toolchain-macos.cmake
2026-05-17 08:47:25 +08:00

16 lines
507 B
CMake
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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)