Skip to content

Commit de40e7f

Browse files
committed
build - simplify pi build scripts
1 parent 916d4ea commit de40e7f

File tree

2 files changed

+2
-50
lines changed

2 files changed

+2
-50
lines changed

app/pi-config.sh

+1-49
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,4 @@ cleanup_function() {
99
}
1010
trap cleanup_function EXIT
1111

12-
args=("$@")
13-
config="Release"
14-
no_imgui=false
15-
system_libs=false
16-
17-
# extract options and their arguments into variables.
18-
while [ -n "$1" ]; do
19-
case "$1" in
20-
-c|--config)
21-
case $2 in
22-
Release|Debug|RelWithDebInfo|MinSizeRel)
23-
config="$2"
24-
;;
25-
*)
26-
echo "`basename $0`: Error: invalid configuration: '${2}'" 1>&2
27-
echo "Valid configurations: Release, Debug, RelWithDebInfo, MinSizeRel" 1>&2
28-
exit 1
29-
;;
30-
esac
31-
shift 2
32-
;;
33-
-n|--no-imgui)
34-
no_imgui=true
35-
shift
36-
;;
37-
-s|--system-libs|-o|--offline-build)
38-
system_libs=true
39-
shift
40-
;;
41-
--) shift ; break ;;
42-
*) echo "Invalid argument: $1" ; exit 1 ;;
43-
esac
44-
done
45-
46-
echo "Creating build directory..."
47-
mkdir -p "${SCRIPT_DIR}/build"
48-
49-
echo "Generating makefiles..."
50-
cd "${SCRIPT_DIR}/build"
51-
52-
option() {
53-
if [ "$1" == "true" ] || [ "$1" == "!" ] || [ "$1" == "!false" ]; then
54-
echo ON
55-
else
56-
echo OFF
57-
fi
58-
}
59-
60-
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="$config" -DBUILD_IMGUI_INTERFACE="$(option "!$no_imgui")" -DUSE_SYSTEM_LIBS="$(option "$system_libs")" ..
12+
"${SCRIPT_DIR}"/linux-config.sh "$@"

app/pi-prebuild.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ cleanup_function() {
99
}
1010
trap cleanup_function EXIT
1111

12-
VCPKG_FORCE_SYSTEM_BINARIES=1 CC="$(type -p clang)" CXX="$(type -p clang++)" "${SCRIPT_DIR}"/linux-prebuild.sh "$@"
12+
CC="$(type -p clang)" CXX="$(type -p clang++)" "${SCRIPT_DIR}"/linux-prebuild.sh "$@"
1313

0 commit comments

Comments
 (0)