If I want to build and compile this project using cmake.

If I want to build and compile this project using cmake, how can I write cmake instead of existing makefile?
Sorry. Our VEX project is quite different. There is no example of CMAKE. I have to consult here.
this is my CMakeLists.txt


cmake_minimum_required(VERSION 3.13)


set(CMAKE_CROSSCOMPILING TRUE)

set(CMAKE_SYSTEM_NAME "Linux")

set(CMAKE_SYSTEM_PROCESSOR arm)

SET(CMAKE_C_COMPILER "C:/Program Files/PROS/toolchain/usr/bin/arm-none-eabi-gcc")

SET(CMAKE_CXX_COMPILER "C:/Program Files/PROS/toolchain/usr/bin/arm-none-eabi-g++")

if(CMAKE_COMPILER_IS_GNUCXX)
set(GNU_FLAGS "-mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=softfp -Wno-psabi") #–specs=nosys.specs
set(CMAKE_CXX_FLAGS "${GNU_FLAGS} -D_POSIX_THREADS -D_UNIX98_THREAD_MUTEX_ATTRIBUTES -Os --std=gnu++17")
set(CMAKE_C_FLAGS "${GNU_FLAGS} -ffunction-sections -fdata-sections -fdiagnostics-color --std=gnu11")
endif()


INCLUDE_DIRECTORIES("include")

file(GLOB_RECURSE INCLUDES "include/*.h" "include/*.hpp")

file(GLOB_RECURSE SOURCES "src/*.c" "src/*.cpp")


SET(SYSROOT_PATH ${PROJECT_SOURCE_DIR}/bin) 
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/firmware) 
${PROJECT_SOURCE_DIR}/src/init.cpp ${PROJECT_SOURCE_DIR}/src/jsonDemo.cpp ${PROJECT_SOURCE_DIR}/src/opcontrol.cpp)
add_executable(output  ${SOURCES} ${INCLUDES})

target_link_libraries(output  ${LIBRARY_OUTPUT_PATH}/v5.ld ${LIBRARY_OUTPUT_PATH}/libpros.a ${LIBRARY_OUTPUT_PATH}/libResources.a) 

add_custom_target(run
    COMMAND binary
    DEPENDS binary
    WORKING_DIRECTORY ${CMAKE_PROJECT_DIR}
)