# this one is important
|
SET(CMAKE_SYSTEM_NAME Linux)
|
#this one not so much
|
SET(CMAKE_SYSTEM_VERSION 1)
|
|
SET(ROOT /opt/aarch64)
|
# specify the cross compiler
|
SET(CMAKE_C_COMPILER ${ROOT}/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc)
|
SET(CMAKE_CXX_COMPILER ${ROOT}/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++)
|
|
# where is the target environment
|
SET(CMAKE_FIND_ROOT_PATH
|
${ROOT}/sysroot-glibc-linaro-2.23-2017.05-aarch64-linux-gnu
|
)
|
|
# search for programs in the build host directories
|
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
# for libraries and headers in the target directories
|
# SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
# SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|