#!/usr/bin/env bash # Build the mtgodot GDExtension into project/bin/. macOS only (Phase 1). set -euo pipefail cd "$(dirname "$0")" CONFIG="${1:-Debug}" # Debug | Release JOBS="${JOBS:-$(sysctl -n hw.ncpu)}" if [ ! -f extension/godot-cpp/CMakeLists.txt ]; then echo "godot-cpp submodule missing — run: git submodule update --init --recursive" >&2 exit 1 fi cmake -S . -B build -DCMAKE_BUILD_TYPE="$CONFIG" cmake --build build --config "$CONFIG" -j "$JOBS" echo echo "Built libs in project/bin/:" ls -la project/bin/*.dylib 2>/dev/null || echo " (none — check build output above)"