set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_CROSSCOMPILING TRUE)
set(TARGET_NAME hiwifigx)

set(TOOLCHAIN_ROOT /home/ipq806x/staging_dir/toolchain-arm_cortex-a7_gcc-4.8-linaro_uClibc-1.0.14_eabi/)
set(TOOLCHAIN_ABI arm-openwrt-linux-uclibcgnueabi)
set(CROSS_COMPILE_PREFIX arm-openwrt-linux-)

set(CMAKE_SYSROOT ${TOOLCHAIN_ROOT})

set(CMAKE_C_COMPILER ${TOOLCHAIN_ROOT}/bin/${CROSS_COMPILE_PREFIX}gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_ROOT}/bin/${CROSS_COMPILE_PREFIX}g++)
set(CMAKE_AR ${TOOLCHAIN_ROOT}/bin/${CROSS_COMPILE_PREFIX}ar)
set(CMAKE_RANLIB ${TOOLCHAIN_ROOT}/bin/${CROSS_COMPILE_PREFIX}ranlib)
set(CMAKE_RC ${TOOLCHAIN_ROOT}/bin/${CROSS_COMPILE_PREFIX}windres)

set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_ROOT})

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)
