-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
52 lines (41 loc) · 1.21 KB
/
setup.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
#!/usr/bin/env bash
# Install any git submodules
git submodule update --init --recursive
# Add vcpkg to PATH
export VCPKG_ROOT=$(pwd)/dependencies/vcpkg
export PATH=$VCPKG_ROOT:$PATH
# Bootstrap vcpkg
$VCPKG_ROOT/bootstrap-vcpkg.sh
echo "VCPKG_ROOT is set to $VCPKG_ROOT"
echo "PATH was updated to include vcpkg"
echo "\n-------------------------------------"
# Verify VCPKG_ROOT exists and is included in PATH
vcpkg version
echo "\n-------------------------------------"
# Determine OS and set triplet
if [[ "$OSTYPE" == "darwin"* ]]; then
TRIPLET="x64-osx"
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
TRIPLET="x64-linux"
elif [[ "$OSTYPE" == "msys"* ]]; then
TRIPLET="x64-windows"
else
echo "Unsupported OS type: $OSTYPE"
exit 1
fi
# Create vcpkg.json file if it does not exist
if [[ ! -f "vcpkg.json" ]]; then
echo "No vcpkg.json file found. Creating one now..."
vcpkg new --application
echo "Adding dependencies..."
vcpkg add port glew
vcpkg add port glfw3
vcpkg add port opengl
vcpkg add port glm
vcpkg add port pkgconf
echo "Installing dependencies..."
vcpkg install --triplet $TRIPLET
else
echo "vcpkg.json file already exists."
fi
echo "Setup Complete!"