# Simple toolchain template file for gcc running on {{ARCH}} {{OS}}
set(CMAKE_SYSTEM_NAME {{OS}})
set(CMAKE_SYSTEM_PROCESSOR {{ARCH}})

set(CMAKE_SYSROOT /opt/{{TARGET}}/{{TARGET}}/sys-root/)
set(CMAKE_INSTALL_PREFIX $ENV{prefix})

set(CMAKE_C_COMPILER /opt/{{TARGET}}/bin/{{TARGET}}-gcc)
set(CMAKE_CXX_COMPILER /opt/{{TARGET}}/bin/{{TARGET}}-g++)

if( $ENV{CC} MATCHES ccache )
    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
endif()

