From 1d1f0cabacc04a822ee98d2be2e909188cef0308 Mon Sep 17 00:00:00 2001 From: prisixia Date: Wed, 24 May 2023 20:01:40 +0200 Subject: [PATCH] Add toolchain file for mingw32-w64 Used for compiling for Windows on a Linux host. --- mingw32-w64.cmake | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 mingw32-w64.cmake diff --git a/mingw32-w64.cmake b/mingw32-w64.cmake new file mode 100644 index 0000000..cd03f19 --- /dev/null +++ b/mingw32-w64.cmake @@ -0,0 +1,7 @@ +set(CMAKE_SYSTEM_NAME Windows) +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) +set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) +set(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32" "/usr/local/x86_64-w64-mingw32") +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_EXE_LINKER_FLAGS "-static -static-libgcc -static-libstdc++")