2018-02-06 21:51:14 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# script to build on mac
|
|
|
|
build=MinSizeRel
|
2018-08-18 00:46:38 +03:00
|
|
|
dataCompressionLib=libcompression
|
2018-02-06 21:51:14 +03:00
|
|
|
|
|
|
|
usage()
|
|
|
|
{
|
2018-08-18 00:46:38 +03:00
|
|
|
echo "usage: makemac [-b buildType] [-zlib]"
|
2018-02-06 21:51:14 +03:00
|
|
|
echo $'\t' "-b Build type. Default MinSizeRel"
|
2018-08-18 00:46:38 +03:00
|
|
|
echo $'\t' "-zlib Use Zlib instead of inbox libCompression api. Default on MacOS is libCompression."
|
2018-02-06 21:51:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
printsetup()
|
|
|
|
{
|
|
|
|
echo "Build Type:" $build
|
2018-08-18 00:46:38 +03:00
|
|
|
echo "Data Compression library:" $dataCompressionLib
|
2018-02-06 21:51:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
while [ "$1" != "" ]; do
|
|
|
|
case $1 in
|
|
|
|
-b ) shift
|
|
|
|
build=$1
|
|
|
|
;;
|
2018-08-18 00:46:38 +03:00
|
|
|
-zlib ) shift
|
|
|
|
dataCompressionLib=zlib
|
|
|
|
zlib="-DUSE_ZLIB=on"
|
|
|
|
;;
|
2018-02-06 21:51:14 +03:00
|
|
|
-h ) usage
|
|
|
|
exit
|
|
|
|
;;
|
|
|
|
* ) usage
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
printsetup
|
|
|
|
|
|
|
|
mkdir .vs
|
|
|
|
cd .vs
|
|
|
|
|
2018-02-14 00:25:38 +03:00
|
|
|
# clean up any old builds of msix modules
|
|
|
|
find . -name *msix* -d | xargs rm -r
|
2018-02-06 21:51:14 +03:00
|
|
|
|
2018-08-18 00:46:38 +03:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=$build $zlib -DMACOS=on ..
|
2018-02-06 21:51:14 +03:00
|
|
|
make
|