How do I link amazon freertos to my project

Hi @gedeonag
I this is my current CMakelists.txt

cmake_minimum_required(VERSION 3.13)

project(my_app)

add_executable(${PROJECT_NAME} src/main.c)

set(IDF_PROJECT_EXECUTABLE ${PROJECT_NAME})

# Add FreeRTOS as a subdirectory. AFR_BOARD tells which board to target.
set(AFR_BOARD cypress.CY8CKIT_064S0S2_4343W CACHE INTERNAL "")
set(AFR_TOOLCHAIN arm-gcc CACHE INTERNAL "")

add_subdirectory(freertos)

# Link against the mqtt library so that we can use it. Dependencies are transitively
# linked.
target_link_libraries(${PROJECT_NAME} PRIVATE 
                        AFR::freertos 
                        AFR::kernel 
                        AFR::core_http 
                        AFR::core_json
                        AFR::secure_sockets
                        AFR::ble
                        AFR::wifi
                        )

but when I run cmake -S . -B .\build -G "MinGW Makefiles" it uses my mingw gcc compiler and not my arm-none-eabi-gcc compiler but when I build freertos using cmake -DVENDOR=cypress -DBOARD=CY8CKIT_064S0S2_4343W -DCOMPILER=arm-gcc -S .\freertos\ -B .\build\ -G "MinGW Makefiles" it does use my arm-none-eabi-gcc compiler.
any ideas of how I can fix this?