forked from test12416/OpenONVIF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildAll.sh
39 lines (32 loc) · 932 Bytes
/
buildAll.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
#!/bin/bash
# Script produces all binaries for onvifsdk
# BuildScript name
bs="buildOSDK"
SCRIPT=`realpath $0`
# BuildScript working directory
SC_DIR=`dirname $SCRIPT`
source ${SC_DIR}/helperFunc.sh
# go to bin dir
mkdir $SC_DIR/bin
cd $SC_DIR/bin
# dir for OnvifSDK
if [ ! -f "${SC_DIR}/bin/OnvifSDK-b/libOnvifSDK.a" ]; then
mkdir OnvifSDK-b
cd OnvifSDK-b
cmake ../../OnvifSDK -DSIGRLOG_OUTPUT=1 -DDEVICE_TYPE=NVT || checkErr "OnvifSDK config failed"
make || checkErr "OnvifSDK make failed"
cd ..
fi
# dir for Client
mkdir client
cd client
cmake ../../examples/OnvifClient -DSDK="$SC_DIR/bin/OnvifSDK-b" || checkErr "OnvifClient config failed"
make || checkErr "OnvifClient make failed"
cd ..
# dir for Server
mkdir server
cd server
cmake ../../examples/OnvifServer -DSDK="$SC_DIR/bin/OnvifSDK-b" || checkErr "OnvifServer config failed"
make || checkErr "OnvifServer make failed"
cd ../..
succMessage "We are all good"