forked from imp5imp5/dasbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_linux.sh
executable file
·39 lines (33 loc) · 957 Bytes
/
build_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
CUR_DIR=`pwd`
INCLUDE_DAS="$CUR_DIR/src"
CPU_COUNT=`nproc --all`
# ============ daScript ==============
pushd 3rdParty/daScript
rm -rf ./build/ 2>/dev/null
mkdir build
pushd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DDAS_CONFIG_INCLUDE_DIR=$INCLUDE_DAS ..
make libUriParser -j $CPU_COUNT
make libDasModuleUriparser -j $CPU_COUNT
make libDaScript -j $CPU_COUNT
popd
popd
# ============ SFML ==================
pushd 3rdParty/SFML
rm -rf ./build/ 2>/dev/null
mkdir build
pushd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DSFML_BUILD_AUDIO=FALSE -DSFML_BUILD_EXAMPLES=FALSE -DBUILD_SHARED_LIBS:BOOL=FALSE ..
make all -j $CPU_COUNT
popd
popd
# ============ dasbox ================
rm -rf ./cmake_tmp/ 2>/dev/null
mkdir cmake_tmp
pushd cmake_tmp
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../src
make all -j $CPU_COUNT
popd
# ============ copy ==================
mkdir bin 2>/dev/null
cp cmake_tmp/dasbox ./bin/