set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_C_COMPILER "aarch64-w64-mingw32-gcc")

# Magic
set(CMAKE_C_FLAGS_INIT "" CACHE STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS_INIT "" CACHE STRING "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_INIT "" CACHE STRING "" FORCE)
unset(CMAKE_SYSROOT CACHE)
unset(CMAKE_SYSROOT_COMPILE CACHE)
unset(CMAKE_SYSROOT_LINK CACHE)
unset(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN CACHE)
unset(CMAKE_C_COMPILER_TARGET CACHE)
unset(CMAKE_C_FLAGS CACHE)
unset(CMAKE_C_FLAGS_DEBUG CACHE)
unset(CMAKE_C_FLAGS_RELEASE CACHE)
set(CMAKE_POSITION_INDEPENDENT_CODE OFF)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
