-
Notifications
You must be signed in to change notification settings - Fork 167
/
makeios.sh
executable file
·88 lines (82 loc) · 2.62 KB
/
makeios.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash
# script to build on mac for ios
build=MinSizeRel
arch=x86_64
dataCompressionLib=libcompression
bundle=off
xmlparser=applexml
validationParser=off
samples=on
tests=on
usage()
{
echo "usage: makemac [options]"
echo $'\t' "-b build_type Default MinSizeRel"
echo $'\t' "-arch arch OSX Architecture. Default x86_64 (simulator)"
echo $'\t' "-xzlib Use MSIX SDK Zlib instead of inbox libCompression api. Default on iOS is libCompression."
echo $'\t' "-sb Skip bundle support."
echo $'\t' "-parser-xerces Use xerces xml parser instead of default apple xml parser."
echo $'\t' "--validation-parser|-vp Enable XML schema validation."
echo $'\t' "--skip-samples Skip building samples."
echo $'\t' "--skip-tests Skip building tests."
}
printsetup()
{
echo "Build Type:" $build
echo "Architecture:" $arch
echo "Data Compression library:" $dataCompressionLib
echo "Skip bundle support:" $bundle
echo "Parser:" $xmlparser
echo "Validation parser:" $validationParser
echo "Build samples:" $samples
echo "Build tests:" $tests
}
while [ "$1" != "" ]; do
case $1 in
-b ) shift
build=$1
;;
-arch ) shift
arch=$1
;;
-xzlib )dataCompressionLib=MSIX_SDK_zlib
zlib="-DUSE_MSIX_SDK_ZLIB=on"
;;
-parser-xerces ) xmlparserLib=xerces
xmlparser=xerces
;;
-sb ) bundle="on"
;;
--validation-parser ) validationParser=on
;;
-vp ) validationParser=on
;;
-h ) usage
exit
;;
--skip-samples ) samples=off
;;
--skip-tests ) tests=off
;;
* ) usage
exit 1
esac
shift
done
printsetup
mkdir .vs
cd .vs
# clean up any old builds of msix modules
find . -name *msix* -d | xargs rm -r
echo "cmake -DCMAKE_BUILD_TYPE="$build $zlib "-DCMAKE_TOOLCHAIN_FILE=../cmake/ios.cmake -DCMAKE_OSX_ARCHITECTURES="$arch
echo "-DXML_PARSER="$xmlparser "-DUSE_VALIDATION_PARSER="$validationParser "-DSKIP_BUNDLES="$bundle "-DMSIX_SAMPLES="$samples "-DMSIX_TESTS="$tests "-DIOS=on .."
cmake -DCMAKE_BUILD_TYPE=$build \
-DCMAKE_TOOLCHAIN_FILE=../cmake/ios.cmake \
-DCMAKE_OSX_ARCHITECTURES=$arch \
-DXML_PARSER=$xmlparser \
-DUSE_VALIDATION_PARSER=$validationParser \
-DSKIP_BUNDLES=$bundle \
-DMSIX_SAMPLES=$samples \
-DMSIX_TESTS=$tests \
$zlib -DIOS=on ..
make