SET(CROSSDEV_TARGET "armv6j-unknown-linux-gnueabihf")
SET(CROSS_PREFIX "/usr/${CROSSDEV_TARGET}/usr" CACHE STRING "crosstool-NG prefix")

SET(CMAKE_SYSTEM_NAME Linux)

# workaround
list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "${CROSS_PREFIX}/include")

SET(CMAKE_C_COMPILER   "${CROSSDEV_TARGET}-gcc")
SET(CMAKE_CXX_COMPILER "${CROSSDEV_TARGET}-g++")

SET(CMAKE_FIND_ROOT_PATH  "${CROSS_PREFIX}")
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(THREADS_PTHREAD_ARG (advanced))
