-
Notifications
You must be signed in to change notification settings - Fork 14
/
prepare_solution_darwin.sh
executable file
·53 lines (40 loc) · 1.16 KB
/
prepare_solution_darwin.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
#!/bin/bash
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
# Build
BUILD_DIR='build'
mkdir $BUILD_DIR
CMAKE='cmake'
if ! command -v $CMAKE &> /dev/null
then
OLDCMAKE=$CMAKE
CMAKE='-/Applications/CMake.app/Contents/bin/cmake'
echo "$OLDCMAKE not found in PATH. Defaulting to: $CMAKE"
fi
$CMAKE -G "Xcode" -S "src/" -B $BUILD_DIR
echo "Xcode project created successfully."
echo "Will proceed to build in Release configuration..."
$CMAKE --build $BUILD_DIR --target azslc --config Release -j 16
pushd $BUILD_DIR/Release
echo "Release version:"
./azslc --version
popd
echo "Will proceed to build in Debug configuration..."
$CMAKE --build $BUILD_DIR --target azslc --config Debug -j 16
pushd $BUILD_DIR/Debug
echo "Debug version:"
./azslc --version
popd
## Deploy
echo "Deploying Release and Debug binaries..."
mkdir bin
mkdir bin/darwin
mkdir bin/darwin/release
mkdir bin/darwin/debug
cp $BUILD_DIR/Release/azslc bin/darwin/release/azslc
cp $BUILD_DIR/Debug/azslc bin/darwin/debug/azslc
echo "Done!"