-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlinux.sh
75 lines (68 loc) · 1.6 KB
/
linux.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
echo EKG building starting...
MODE_BUILD_AND_TEST="build-and-test"
MODE_BUILD_ONLY="build-only"
MODE_COMPILER_EMSCRIPTEN="emscripten"
echo "Building EKG in mode: $EKG_BUILD_MODE; with following compiler: $EKG_BUILD_COMPILER"
if [[ "$EKG_BUILD_MODE" == "$MODE_BUILD_AND_TEST" ]]; then
cmake \
-S . \
-B ./cmake-build \
-G Ninja \
-D CMAKE_EXPORT_COMPILE_COMMANDS=1 \
-D CMAKE_CXX_COMPILER=$EKG_BUILD_COMPILER \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=./ekg-cmake-install
cmake \
--build ./cmake-build \
\
&& \
\
cmake \
--install ./cmake-build \
--prefix ./ekg-cmake-install \
\
&& \
\
cd ./ekg-sandbox \
\
&& \
\
cmake \
-S . \
-B ./cmake-build \
-G Ninja \
-D CMAKE_CXX_COMPILER=$EKG_BUILD_COMPILER \
-D CMAKE_BUILD_TYPE=Release \
-D EKG_DEVELOPER_MODE=1 \
\
&& \
\
cmake \
--build ./cmake-build \
&& cd ./bin && ./ekg-showcase
fi
if [[ "$EKG_BUILD_MODE" == "$MODE_BUILD_ONLY" ]]; then
# #
# Emscripten must be different compiled, due some specific flags
# like 'EKG_EMSCRIPTEN_BUILD_TYPE'.
# #
if [[ "$EKG_BUILD_COMPILER" == "$MODE_COMPILER_EMSCRIPTEN" ]]; then
emcmake cmake \
-S . \
-B ./cmake-build \
-G Ninja \
-D CMAKE_EXPORT_COMPILE_COMMANDS=1 \
-D EKG_EMSCRIPTEN_BUILD_TYPE=1 \
-D CMAKE_BUILD_TYPE=Release
else
cmake \
-S . \
-B ./cmake-build \
-G Ninja \
-D CMAKE_EXPORT_COMPILE_COMMANDS=1 \
-D CMAKE_CXX_COMPILER=$EKG_BUILD_COMPILER \
-D CMAKE_BUILD_TYPE=Release
fi
cmake \
--build ./cmake-build
fi