summaryrefslogtreecommitdiffstats
path: root/docs/mingw-example/toolchain/cmake/aarch64-w64-mingw32-toolchain.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'docs/mingw-example/toolchain/cmake/aarch64-w64-mingw32-toolchain.cmake')
-rw-r--r--docs/mingw-example/toolchain/cmake/aarch64-w64-mingw32-toolchain.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/mingw-example/toolchain/cmake/aarch64-w64-mingw32-toolchain.cmake b/docs/mingw-example/toolchain/cmake/aarch64-w64-mingw32-toolchain.cmake
new file mode 100644
index 0000000..d144eb4
--- /dev/null
+++ b/docs/mingw-example/toolchain/cmake/aarch64-w64-mingw32-toolchain.cmake
@@ -0,0 +1,15 @@
+set(CMAKE_C_COMPILER aarch64-w64-mingw32-gcc)
+set(CMAKE_CXX_COMPILER aarch64-w64-mingw32-g++)
+set(CMAKE_FIND_ROOT_PATH /usr/aarch64-w64-mingw32)
+
+execute_process(COMMAND which aarch64-w64-mingw32-windres OUTPUT_VARIABLE TOOLCHAIN_RC_COMPILER)
+execute_process(COMMAND which aarch64-w64-mingw32-dlltool OUTPUT_VARIABLE TOOLCHAIN_DLLTOOL)
+
+string(STRIP ${TOOLCHAIN_RC_COMPILER} TOOLCHAIN_RC_COMPILER)
+set(CMAKE_RC_COMPILER ${TOOLCHAIN_RC_COMPILER})
+
+string(STRIP ${TOOLCHAIN_DLLTOOL} TOOLCHAIN_DLLTOOL)
+set(DLLTOOL ${TOOLCHAIN_DLLTOOL})
+
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_SYSTEM_NAME Windows) \ No newline at end of file