set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(BUILDROOT_VARIANT "buildroot")

set(CMAKE_SYSROOT $ENV{BUILDROOT_SDK_PATH}/aarch64-${BUILDROOT_VARIANT}-linux-gnu/sysroot)

set(CMAKE_C_COMPILER $ENV{BUILDROOT_SDK_PATH}/bin/aarch64-${BUILDROOT_VARIANT}-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER $ENV{BUILDROOT_SDK_PATH}/bin/aarch64-${BUILDROOT_VARIANT}-linux-gnu-g++)

set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")

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