get_filename_component(CMAKE_TOOL_DIR ${CMAKE_CURRENT_LIST_FILE} DIRECTORY)
set(NXP_CMAKE_DIR ${CMAKE_TOOL_DIR}/NXP)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_TOOL_DIR} ${NXP_CMAKE_DIR})

include(nxp/common)

set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
find_program(CMAKE_C_COMPILER NAMES ${NXP_TARGET_TRIPLET}-gcc PATHS ${TOOLCHAIN_BIN_PATH})
find_program(CMAKE_CXX_COMPILER NAMES ${NXP_TARGET_TRIPLET}-g++ PATHS ${TOOLCHAIN_BIN_PATH})
find_program(CMAKE_ASM_COMPILER NAMES ${NXP_TARGET_TRIPLET}-gcc PATHS ${TOOLCHAIN_BIN_PATH})

set(CMAKE_EXECUTABLE_SUFFIX_C   .elf)
set(CMAKE_EXECUTABLE_SUFFIX_CXX .elf)
set(CMAKE_EXECUTABLE_SUFFIX_ASM .elf)
