-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·52 lines (41 loc) · 1.08 KB
/
build.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
#!/usr/bin/env bash
# build native file dialog
for ARGUMENT in "$@"
do
KEY=$(echo $ARGUMENT | cut -f1 -d=)
KEY_LENGTH=${#KEY}
VALUE="${ARGUMENT:$KEY_LENGTH+1}"
export "$KEY"="$VALUE"
done
# if [[ $OSTYPE == 'darwin'* ]];
# then
# pushd external/nativefiledialog/build/gmake_macosx
# make clean
# # make CFLAGS=`pkg-config --cflags gtk+-3.0` LDFLAGS=`pkg-config --libs gtk+-3.0`
# make
# popd
# else
# pushd external/nativefiledialog/build/gmake_linux_zenity
# make clean
# # make CFLAGS=`pkg-config --cflags gtk+-3.0` LDFLAGS=`pkg-config --libs gtk+-3.0`
# make
# popd
# fi
rm -rf build
mkdir build
pushd build
echo "Build Type: ${mode-No build type specified}"
echo "WITH_APP=${app=ON}"
echo "WITH_GTESTS=${test=OFF}"
export CC=clang
export CXX=clang++
cmake .. \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_BUILD_TYPE=${mode:-Release} \
-DWITH_GTESTS=${test=-OFF} \
-DWITH_APP=${app=-ON} \
-DwxWidgets_ROOT_DIR=${wx_ROOT:-$HOME/src/wxWidgets-3.2.2/} \
-Wno-dev
make -j4
cp compile_commands.json ../
popd