Skip to content

Commit 9d2cf8b

Browse files
committed
Fix mingw toolchain rc file handling
1 parent 4cff17a commit 9d2cf8b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

toolchain/mingw-toolchain.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
44

55
<section if="linux_host||mac_host">
66
<section if="HXCPP_M64">
7-
<set name="HXCPP_MINGW_EXE" value="x86_64-w64-mingw32-g++" unless="HXCPP_MINGW_EXE" />
8-
<set name="MINGW_ROOT" value="/usr/x86_64-w64-mingw32" unless="MINGW_ROOT" />
7+
<set name="ABITRIPLE" value="x86_64-w64-mingw32" />
98
</section>
109
<section unless="HXCPP_M64">
11-
<set name="HXCPP_MINGW_EXE" value="i686-w64-mingw32-g++" unless="HXCPP_MINGW_EXE" />
12-
<set name="MINGW_ROOT" value="/usr/i686-w64-mingw32" unless="MINGW_ROOT" />
10+
<set name="ABITRIPLE" value="i686-w64-mingw32" />
1311
</section>
12+
<set name="EXEPREFIX" value="${ABITRIPLE}" />
13+
<set name="HXCPP_MINGW_EXE" value="${EXEPREFIX}-g++" unless="HXCPP_MINGW_EXE" />
14+
<set name="HXCPP_MINGW_RC_EXE" value="${EXEPREFIX}-windres" unless="HXCPP_MINGW_RC_EXE" />
15+
<set name="MINGW_ROOT" value="/usr/${ABITRIPLE}" unless="MINGW_ROOT" />
1416
</section>
1517

1618
<set name="HXCPP_MINGW_EXE" value="g++.exe" unless="HXCPP_MINGW_EXE"/>
19+
<set name="HXCPP_MINGW_RC_EXE" value="windres.exe" unless="HXCPP_MINGW_RC_EXE" />
1720

1821

1922
<setup name="mingw" />
@@ -49,6 +52,9 @@
4952
<objdir value="obj/mingw${OBJEXT}/"/>
5053
<outflag value="-o"/>
5154
<ext value=".o"/>
55+
56+
<rcexe name="${HXCPP_MINGW_RC_EXE}" />
57+
<rcext value=".o" />
5258
</compiler>
5359

5460
<linker id="dll" exe="g++">

0 commit comments

Comments
 (0)