1 include(CMakeForceCompiler)
3 set(TOOLCHAIN_PREFIX mips-linux-gnu)
5 set(CMAKE_SYSTEM_NAME Linux)
6 set(CMAKE_SYSTEM_VERSION 1)
7 set(CMAKE_SYSTEM_PROCESSOR mips)
9 # This is the location of the mips toolchain
10 set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
11 set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
13 # This is the file system root of the target
14 set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
16 # Search for programs in the build host directories
17 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
19 # For libraries and headers in the target directories
20 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
21 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)