-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·43 lines (32 loc) · 761 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·43 lines (32 loc) · 761 Bytes
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
#!/bin/bash
usage() {
echo "Usage: $0 (release|debug)"
exit 1
}
if [[ $# -ne 1 ]]; then
usage
fi
case $1 in
release)
BUILD_TYPE="Release"
PRESET_NAME="conan-release"
;;
debug)
BUILD_TYPE="Debug"
PRESET_NAME="conan-debug"
;;
*)
usage
;;
esac
base_dir=$(readlink -f "$(dirname "${BASH_SOURCE[@]}")/../")
pushd "$base_dir" || exit 1
PROFILE_PATH="./profiles/macos"
# shellcheck source=/dev/null
source ".venv/bin/activate"
conan install . --build=missing --profile:host=$PROFILE_PATH --profile:build=$PROFILE_PATH --settings=build_type=$BUILD_TYPE
# shellcheck source=/dev/null
source "build/$BUILD_TYPE/generators/conanbuild.sh"
cmake --preset $PRESET_NAME
cmake --build --preset $PRESET_NAME
popd || exit 1