-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_au.sh
28 lines (23 loc) · 849 Bytes
/
build_au.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
#!/usr/bin/env bash
clear
echo "Flushing build caches and output folders"
rm -rf build
echo "Building project"
echo "----------------"
# from http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
BASEDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
mkdir -p build
cd build
if [ -n "${VST3_SDK_ROOT}" ]; then
DVST3_SDK_ROOT="-DVST3_SDK_ROOT=${VST3_SDK_ROOT}"
fi
# run CMake using Audio Unit build target
cmake -GXcode ${DVST3_SDK_ROOT} "-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64" "-DCREATE_AUDIO_UNIT=ON" "-DSMTG_COREAUDIO_SDK_PATH=/Library/CoreAudioSDK/CoreAudio" "${BASEDIR}"
cmake --build . --config Release
cd ..