#!/bin/bash

# 🏁 Auto-detectar ruta base del proyecto
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"

# 📁 Ruta al build
BUILD_DIR="$PROJECT_ROOT/build"

# 📄 Archivo de mapping personalizado
MAPPING_FILE="$SCRIPT_DIR/sdl3_mapping.imp"

# 📦 Generar compile_commands.json
echo "🔧 Generando compile_commands.json..."
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -S "$PROJECT_ROOT" -B "$BUILD_DIR"

