-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuildExtLibs.sh
More file actions
executable file
·69 lines (54 loc) · 1.71 KB
/
buildExtLibs.sh
File metadata and controls
executable file
·69 lines (54 loc) · 1.71 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
## This scripts clean all old build information and starts a fresh build
## Arguments: release : Do a release-build with packaging
build_type=debug
if [ "$1" = "release" ]; then
build_type=release
fi
source common.sh
# set environment variables needed for windows build tools
function run_vs14
{
# The environment variable VS140COMNTOOLS exists when Visual Studio 2015 is installed
eval vssetup="\$VS140COMNTOOLS\\..\\\..\\\VC\\\vcvarsall.bat"
cmd /Q /C call "$vssetup" x64 "&&" "${@}"
}
./cleanAll.sh
if [ ! -d build_ext_libs ]; then
mkdir build_ext_libs
fi
if [ ! -d ext_libs/FreeRDP ]; then
pushd ext_libs
./checkoutExternal.sh
popd
fi
pushd build_ext_libs
startTime=`date`
if [ "$OS" == "Windows" ]; then
echo "windows: start cmake" || exit $?
if [ "$build_type" = "release" ]; then
run_vs14 cmake -D CMAKE_BUILD_TYPE=Release -G"NMake Makefiles JOM" $@ ../ext_libs/ || exit $?
#run_vs14 cmake -D CMAKE_BUILD_TYPE=Release -G"NMake Makefiles" $@ ../ext_libs/ || exit $?
else
run_vs14 cmake -D CMAKE_BUILD_TYPE=Debug -G"NMake Makefiles JOM" $@ ../ext_libs/ || exit $?
#run_vs14 cmake -D CMAKE_BUILD_TYPE=Debug -G"NMake Makefiles" $@ ../ext_libs/ || exit $?
fi
run_vs14 jom -j 8 all || exit $?
#run_vs14 nmake all || exit $?
else
# Linux
if [ "$build_type" = "release" ]; then
cmake -D CMAKE_BUILD_TYPE=Release ../ext_libs/ || exit $?
else
cmake -D CMAKE_BUILD_TYPE=Debug ../ext_libs/ || exit $?
fi
# use 8 threads for compilation
make -j -l 8 all || exit $?
#make all || exit $?
# if [ "$build_type" = "release" ]; then
# cpack -G DEB .. || exit $?
# fi
fi
popd
echo "ExtLibs-Build started at: $startTime"
echo "ExtLibs-Build finished at: `date`"