# the name of the target operating system SET(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR arm64) # which C and C++ compiler to use set(CMAKE_C_COMPILER "/usr/bin/aarch64-linux-gnu-gcc") set(CMAKE_CXX_COMPILER "/usr/bin/aarch64-linux-gnu-g++") # here is the target environment located SET(CMAKE_FIND_ROOT_PATH /usr/lib/aarch64-linux-gnu) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)