-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.sh
executable file
·48 lines (34 loc) · 1.12 KB
/
meson.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
39
40
41
42
43
44
45
46
47
#!/bin/bash
dirTut="t01_tcp-echo-server"
if [ ! -z "$1" ]; then
inUser="$1"
echo "User input: $inUser"
if [ -d "$inUser" ]; then
dirTut="$inUser"
else
dirTut="$(ls -1 | grep "$inUser" | sort | head -n 1)"
fi
fi
echo "Building tutorial: $dirTut"
if [ ! -d "$dirTut" ]; then
echo "Could not build tutorial. Wrong directory?"
exit 1
fi
cd "$dirTut"
if [ ! -d "build-meson-ubuntu" ]; then
meson setup build-meson-ubuntu
fi
ninja -C build-meson-ubuntu
exit 0
if [ ! -d "build-meson-windows" ]; then
meson setup --cross-file ../docker/dependencies/build/crosscompile-win64.txt build-meson-windows
verMinGw="$(ls -1 /usr/lib/gcc/x86_64-w64-mingw32 | grep posix | tail -1)"
cp /usr/lib/gcc/x86_64-w64-mingw32/$verMinGw/libgcc_s_seh-1.dll build-meson-windows/.
cp /usr/lib/gcc/x86_64-w64-mingw32/$verMinGw/libstdc++-6.dll build-meson-windows/.
cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll build-meson-windows/.
fi
ninja -C build-meson-windows
if [ ! -d "build-meson-raspberry" ]; then
meson setup --cross-file ../docker/dependencies/build/crosscompile-rpi.txt build-meson-raspberry
fi
ninja -C build-meson-raspberry