shithub: puzzles

Download patch

ref: 8ff394d1cc42efc3509135bbdd6ce92498eafcf3
parent: 2d2d7e8678e55d555554203e3ffec44610bc2c25
author: Jacob Nevins <jacobn@chiark.greenend.org.uk>
date: Tue Apr 27 07:06:44 EDT 2021

Toolchain file for MinGW cross-compilation.

Cribbed from the PuTTY one. Use with something like
cmake . -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-mingw.cmake

--- /dev/null
+++ b/cmake/toolchain-mingw.cmake
@@ -1,0 +1,12 @@
+# Simple toolchain file for cross-building Windows Puzzles on Linux
+# using MinGW (tested on Debian).
+
+set(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_PROCESSOR x86_64)
+
+set(CMAKE_C_COMPILER  x86_64-w64-mingw32-gcc)
+set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
+set(CMAKE_AR          x86_64-w64-mingw32-ar)
+set(CMAKE_RANLIB      x86_64-w64-mingw32-ranlib)
+
+add_compile_definitions(MINGW32_FIX)