Skip to content

Commit fcc307c

Browse files
committed
Update toolchain file
1 parent 3d395a4 commit fcc307c

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/misc/toolchain-mingw.cmake

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1-
# ------------------------------------------------------------------------------
1+
# --------------------------
22
# Cross-compiling with MinGW
3-
# ------------------------------------------------------------------------------
4-
# Use the commands below to build the Windows version of Open Surge with MinGW:
3+
# --------------------------
4+
# Use the commands below to build the 32-bit Windows version of Open Surge with MinGW:
55
#
6-
# $ mkdir build && cd build
7-
# $ cmake .. \
6+
# mkdir build && cd build
7+
# cmake .. \
88
# -DCMAKE_TOOLCHAIN_FILE=../src/misc/toolchain-mingw.cmake
9-
# $ make && sudo make install
9+
# make && sudo make install
1010
#
1111
# This is for cross-compiling only.
12-
# ------------------------------------------------------------------------------
1312

1413
# Set the system name
1514
set(CMAKE_SYSTEM_NAME Windows)
1615

16+
# Set the target architecture
17+
set(CMAKE_SYSTEM_PROCESSOR X86)
18+
1719
# Set the location of the C compiler and of the target environment (MINGDIR)
1820
# The paths below are taken from the Allegro 5 build system; if MinGW isn't
1921
# found automatically in your system, please adjust the paths manually:
20-
if(EXISTS /usr/i586-mingw32msvc)
21-
set(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
22-
set(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
23-
set(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
24-
set(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)
25-
elseif(EXISTS /usr/i686-w64-mingw32)
22+
if(EXISTS /usr/i686-w64-mingw32)
2623
set(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
2724
set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
2825
set(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
2926
set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
3027
set(CMAKE_AR:FILEPATH /usr/bin/i686-w64-mingw32-ar)
28+
elseif(EXISTS /usr/i586-mingw32msvc)
29+
set(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
30+
set(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
31+
set(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
32+
set(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)
3133
elseif(EXISTS /opt/mingw)
3234
set(CMAKE_C_COMPILER /opt/mingw/usr/bin/i686-pc-mingw32-gcc)
3335
set(CMAKE_CXX_COMPILER /opt/mingw/usr/bin/i686-pc-mingw32-g++)

0 commit comments

Comments
 (0)