set(32BLIT_SDK_DIRNAME "../fips-sdks/32blit-sdk")
get_filename_component(32BLIT_SDK_PATH "../fips-sdks/32blit-sdk" ABSOLUTE)

set(CMAKE_C_COMPILER arm-none-eabi-gcc CACHE PATH "Path to C compiler")
set(CMAKE_CXX_COMPILER arm-none-eabi-g++ CACHE PATH "Path to C++ compiler")

# find the 32blit SDK
macro(find_32blit_sdk)
    # first check for the official 32blit-sdk
    get_filename_component(32BLIT_SDK_TOOLCHAIN "${CMAKE_CURRENT_LIST_DIR}/../${32BLIT_SDK_DIRNAME}/32blit.toolchain" ABSOLUTE)
    if (NOT EXISTS "${32BLIT_SDK_TOOLCHAIN}")
        message(FATAL_ERROR "Could not find 32blit SDK! Please run 'fips setup 32blit'!")
    endif()
endmacro()

# set the original the 32blit SDK toolchain
find_32blit_sdk()

include("${32BLIT_SDK_TOOLCHAIN}")

set(FIPS_PLATFORM 32BLIT)
set(FIPS_PLATFORM_NAME "32blit")
set(FIPS_32BLIT 1)
set(FIPS_POSIX 1)
