kunlang_mqtt_client/toolchain/himix210-aarch64.cmake
2025-07-14 16:55:55 +08:00

23 lines
779 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.

# himix210-aarch64.cmake
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
# 指定交叉编译器前缀路径(替换为你自己路径)
set(TOOLCHAIN_PATH /opt/hisi-linux/x86-arm/aarch64-himix210-linux)
# 设置编译器
set(CMAKE_C_COMPILER ${TOOLCHAIN_PATH}/bin/aarch64-himix210-linux-gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PATH}/bin/aarch64-himix210-linux-g++)
# 可选:设置 sysroot如果你的交叉工具链提供 target 根目录)
#set(CMAKE_SYSROOT ${TOOLCHAIN_PATH}/target)
# 可选:额外编译参数
# set(CMAKE_C_FLAGS "-O2")
# set(CMAKE_CXX_FLAGS "-O2")
# 防止 CMake 自动检查主机编译器
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)