1*4882a593SmuzhiyunSET(TOOLCHAIN_HOME "/home1/yqw/linux/rk3588/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu") 2*4882a593SmuzhiyunSET(TOOLCHAIN_NAME "aarch64-rockchip1031-linux-gnu") 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun# this is required 5*4882a593Smuzhiyun#SET(CMAKE_SYSTEM_NAME Linux) 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun# specify the cross compiler 8*4882a593SmuzhiyunSET(CMAKE_C_COMPILER ${TOOLCHAIN_HOME}/bin/${TOOLCHAIN_NAME}-gcc) 9*4882a593SmuzhiyunSET(CMAKE_CXX_COMPILER ${TOOLCHAIN_HOME}/bin/${TOOLCHAIN_NAME}-g++) 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun# where is the target environment 12*4882a593SmuzhiyunSET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_HOME}) 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun# search for programs in the build host directories (not necessary) 15*4882a593SmuzhiyunSET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 16*4882a593Smuzhiyun# for libraries and headers in the target directories 17*4882a593SmuzhiyunSET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 18*4882a593SmuzhiyunSET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 19