Skip to content

Commit 404776d

Browse files
committed
Add mingw-cross-file.txt
Useful when cross-building from Linux to Windows with MinGW.
1 parent 822636a commit 404776d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

mingw-cross-file.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Cross compiling with MinGW, Linux -> Windows
2+
# meson --cross-file mingw-cross-file.txt .....
3+
4+
[constants]
5+
prefix = 'x86_64-w64-mingw32-'
6+
7+
[binaries]
8+
c = prefix + 'gcc'
9+
cpp = prefix + 'g++'
10+
ar = prefix + 'ar'
11+
strip = prefix + 'strip'
12+
windres = prefix + 'windres'
13+
exe_wrapper = 'wine64'
14+
15+
[host_machine]
16+
system = 'windows'
17+
cpu_family = 'x86_64'
18+
cpu = 'x86_64'
19+
endian = 'little'
20+
21+
[cmake]
22+
CMAKE_C_COMPILER = prefix + 'gcc'
23+
CMAKE_CXX_COMPILER = prefix + 'g++'

0 commit comments

Comments
 (0)