#!/usr/bin/env bash

# omarchy:summary=Install the C and C++ toolchain: compilers, autotools, CMake, Meson and Ninja
# omarchy:requires-sudo=true

# Based: Debian's own cmake, meson and ninja rather than an asdf build of
# each, brew's on a Mac, which is the notarized CMake. Bazel is not in
# Debian and is left out; the editor extensions that go with the toolchain
# come last.

set -eo pipefail

echo "Installing the C/C++ toolchain..."
omarchy-pkg-add build-essential brew=gcc autoconf automake bison cmake libtool llvm pkg-config brew=pkgconf \
  protobuf-compiler brew=protobuf libclang-dev linux=only meson ninja-build brew=ninja

omarchy-code-extensions bazelbuild.vscode-bazel maelvalais.autoconf mesonbuild.mesonbuild ms-vscode.cmake-tools ms-vscode.cpptools
