-
Notifications
You must be signed in to change notification settings - Fork 3
/
bld_sfml32d.sh
38 lines (37 loc) · 878 Bytes
/
bld_sfml32d.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
if [ $MSYSTEM != "MINGW32" ]; then
echo "You MUST launch MSYS2 using mingw32_shell.bat"
echo "OR set the PROCESS environment variable: MSYSTEM , to 'MINGW32', prior launching mintty.exe"
exit
fi
if [ ! -d ~/sfml ]; then
git clone --recursive https://github.com/SFML/SFML.git sfml
else
cd sfml
git pull
fi
cd ~
if [ ! -d ~/sfml32d ]; then
mkdir ~/sfml32d
fi
cd ~/sfml32d
if [ -f Makefile ]; then
make clean
fi
cd ~/sfml32d
THREAD=$(nproc)
THREAD=$((THREAD<2?1:THREAD-1))
cmake \
-G"MSYS Makefiles" \
-DCMAKE_C_FLAGS=" -m32" \
-DCMAKE_CXX_FLAGS=" -m32" \
-DCMAKE_EXE_LINKER_FLAGS=" -m32" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DSFML_BUILD_EXAMPLES=ON \
-DSFML_BUILD_DOC=OFF \
-DSFML_INSTALL_PKGCONFIG_FILES=OFF \
-DSFML_USE_STATIC_STD_LIBS=ON \
-DBUILD_SHARED_LIBS=OFF \
${HOME}/sfml \
make -j$THREAD