diff options
Diffstat (limited to 'scripts/dev-setup.sh')
| -rwxr-xr-x | scripts/dev-setup.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/dev-setup.sh b/scripts/dev-setup.sh new file mode 100755 index 0000000..69929d3 --- /dev/null +++ b/scripts/dev-setup.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# One-shot dev environment: configure, build, IDE compile_commands symlink. +set -e + +root="$(cd "$(dirname "$0")/.." && pwd)" + +cmake -B "$root/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + +cmake --build "$root/build" + +if [ -f "$root/build/compile_commands.json" ]; then + ln -sf build/compile_commands.json "$root/compile_commands.json" + echo "Linked compile_commands.json -> build/compile_commands.json" +fi + +echo "Ready. Install (default → ./bin): cmake --install $root/build" +echo "Start: $root/bin/hybbx-start or $root/scripts/hybbx.sh" |
