set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR aarch64)

set(CROSS_TRIPLE "aarch64-linux-gnu")

set(CMAKE_C_COMPILER $ENV{ARM64XC_ROOT}/$ENV{TOOLCHAIN}/bin/${CROSS_TRIPLE}-gcc)
set(CMAKE_CXX_COMPILER $ENV{ARM64XC_ROOT}/$ENV{TOOLCHAIN}/bin/${CROSS_TRIPLE}-g++)

set(CMAKE_SYSROOT $ENV{SYSROOT})

set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
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)


# Discard path returned by pkg-config and associated with HINTS in module
# like FindOpenSSL.
set(CMAKE_IGNORE_PATH /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/lib/)