Files
fn_registry/bash/functions/infra/install_cpp_deps.sh
T
egutierrez 73a4c3a148 feat: add C++ support with ImGui/ImPlot framework and vendor submodules
Añade soporte C++ al registry: vendor submodules (glfw, imgui, implot, tracy),
sistema de build con CMake y toolchains cross-platform, runner C++ en fn CLI,
parser de tests Google Test, y funciones bash para build Linux/Windows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 23:46:36 +02:00

50 lines
1.1 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
echo "[install_cpp_deps] Checking C++ build dependencies..."
MISSING=()
if ! command -v cmake &>/dev/null; then
MISSING+=(cmake)
else
echo " cmake: $(cmake --version | head -1)"
fi
if ! command -v g++ &>/dev/null; then
MISSING+=(g++ build-essential)
else
echo " g++: $(g++ --version | head -1)"
fi
if ! dpkg -s libglfw3-dev &>/dev/null 2>&1; then
MISSING+=(libglfw3-dev)
else
echo " libglfw3-dev: installed"
fi
if ! dpkg -s libgl1-mesa-dev &>/dev/null 2>&1; then
MISSING+=(libgl1-mesa-dev)
else
echo " libgl1-mesa-dev: installed"
fi
# Optional: mingw for cross-compile
if command -v x86_64-w64-mingw32-g++ &>/dev/null; then
echo " mingw-w64: $(x86_64-w64-mingw32-g++ --version | head -1)"
else
echo " mingw-w64: not installed (optional, for Windows cross-compile)"
fi
if [ ${#MISSING[@]} -eq 0 ]; then
echo "[install_cpp_deps] All dependencies satisfied."
exit 0
fi
echo ""
echo "[install_cpp_deps] Missing packages: ${MISSING[*]}"
echo "[install_cpp_deps] Installing..."
sudo apt-get update -qq
sudo apt-get install -y -qq "${MISSING[@]}"
echo "[install_cpp_deps] Done."