Files
kinect/tracker-native/build.sh
T

62 lines
2.5 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ORT="${HERE}/third_party/onnxruntime-linux-x64"
mkdir -p "${HERE}/build"
CORE="${HERE}/../core"
g++ -std=c++17 -O2 -Wall -Wextra \
-I "${ORT}/include" \
"${HERE}/src/ort_smoke.cpp" \
-o "${HERE}/build/ort_smoke" \
-L "${ORT}/lib" -l:libonnxruntime.so.1 -Wl,-rpath,"${ORT}/lib"
echo "built ${HERE}/build/ort_smoke"
g++ -std=c++17 -O2 -Wall -Wextra \
-I "${CORE}" -I "${HERE}/src" \
"${HERE}/src/shm_publisher.cpp" "${HERE}/src/shm_roundtrip_test.cpp" \
-o "${HERE}/build/shm_roundtrip_test"
"${HERE}/build/shm_roundtrip_test"
g++ -std=c++17 -O2 -Wall -Wextra \
-I "${ORT}/include" -I "${HERE}/src" \
"${HERE}/src/pose_estimator.cpp" "${HERE}/src/pose_probe.cpp" \
-o "${HERE}/build/pose_probe" \
-L "${ORT}/lib" -l:libonnxruntime.so.1 -Wl,-rpath,"${ORT}/lib"
echo "built ${HERE}/build/pose_probe"
g++ -std=c++17 -O2 -Wall -Wextra \
-I "${ORT}/include" -I "${HERE}/src" -I "${CORE}" \
"${HERE}/src/pose_estimator.cpp" "${HERE}/src/shm_publisher.cpp" \
"${HERE}/src/frame_pipeline.cpp" "${HERE}/src/pipeline_probe.cpp" \
"${CORE}/mapping/mapping.cpp" "${CORE}/synth/synth.cpp" \
"${CORE}/synth/mask_stabilizer.cpp" "${CORE}/contract/contract.cpp" \
-o "${HERE}/build/pipeline_probe" \
-L "${ORT}/lib" -l:libonnxruntime.so.1 -Wl,-rpath,"${ORT}/lib"
echo "built ${HERE}/build/pipeline_probe"
g++ -std=c++17 -O2 -Wall -Wextra \
-I "${ORT}/include" -I "${HERE}/src" \
"${HERE}/src/pose_estimator.cpp" "${HERE}/src/skel_render_probe.cpp" \
-o "${HERE}/build/skel_render_probe" \
-L "${ORT}/lib" -l:libonnxruntime.so.1 -Wl,-rpath,"${ORT}/lib"
echo "built ${HERE}/build/skel_render_probe"
# Linux-only reproducible two-person experiment.
g++ -std=c++17 -O2 -Wall -Wextra \
-I "${ORT}/include" -I "${HERE}/src" -I "${CORE}" \
"${HERE}/src/pose_estimator.cpp" "${HERE}/src/two_person_probe.cpp" \
-o "${HERE}/build/two_person_probe" \
-L "${ORT}/lib" -l:libonnxruntime.so.1 -Wl,-rpath,"${ORT}/lib"
echo "built ${HERE}/build/two_person_probe"
# The shim is a Windows DLL but this Linux host check drives the same fixed
# copy/offset policy used inside BuildSkeletonFrame's env-gated branch.
# gnu++17 (not c++17) so glibc exposes POSIX setenv/unsetenv, which the host
# probe uses to drive the REAL KINECT_SHIM_2P read inside the shared gate.
g++ -std=gnu++17 -O2 -Wall -Wextra -DNUI_SHIM_2P_HOST_TEST \
"${HERE}/../fallback/windows-nui/src/sensor.cpp" \
-o "${HERE}/build/two_person_shim_probe"
echo "built ${HERE}/build/two_person_shim_probe"