-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuildScript.sh
36 lines (33 loc) · 942 Bytes
/
buildScript.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
# update or create build directory
UNAME=$( command -v uname)
case $( "${UNAME}" | tr '[:upper:]' '[:lower:]') in
linux*)
echo " Installing on Linux"
if out=$(dpkg --list | grep libxerces-c-dev); then
echo " libxerces-c-dev already installed"
else
echo " install libxerces-c-dev"
sudo apt install libxerces-c-dev
fi
mkdir -p build
cd build
rm -rf *
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../bin ..
cmake --build .
cd ..
;;
msys*|cygwin*|mingw*|nt|win*)
echo "Windows?"
rm -r build
mkdir build
cd build
# configure cmake
cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=../bin -DXercesC_INCLUDE_DIR="../libs/xerces-c-3.2.3/bin/include" -DXercesC_LIBRARY="../libs/xerces-c-3.2.3/bin/lib/xerces-c_3" ..
# make
cmake --build . --config Release
cd ..
;;
*)
echo 'unknown os!\n'
;;
esac