-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·41 lines (34 loc) · 703 Bytes
/
build.sh
File metadata and controls
executable file
·41 lines (34 loc) · 703 Bytes
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
app_name=CodeNect
dir_build=build
dir_install=bin
function debug()
{
cd ${dir_install} && lldb ${app_name}
}
function rebuild()
{
cmake -G Ninja -B${dir_build} -H. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/${dir_install}
}
function compile()
{
cmake --build ${dir_build} --target install
ctags -R src
cp ${dir_build}/compile_commands.json .
}
function run()
{
cd ${dir_install} && ./${app_name}
}
function package_linux()
{
zip -9r codenect_linux.zip assets build.sh build_win.bat cmake CMakeLists.txt config.ini includes lib LICENSE src
}
function clean()
{
rm -rf ${dir_build}/*
}
if [ $# -eq 0 ]; then
echo "Must pass command: rebuild, compile, run, clean"
else
"$@"
fi