# 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)
