Files
qt6-migration-pipeline/app/build_geographiclib.sh
T
torsten 77c67c12ca Execute the same instructions but now for tools in folders you are getti
Entire-Metadata: .entire/metadata/fb87247f-2a75-407e-b336-cbc8c20ba5a6
Entire-Session: fb87247f-2a75-407e-b336-cbc8c20ba5a6
Entire-Strategy: manual-commit
2026-09-24 16:24:51 +00:00

23 lines
625 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# build_geographiclib.sh
# Build and install GeographicLib from source into /usr/local
GIT_REPO=${1:-https://github.com/GeographicLib/GeographicLib.git}
INSTALL_PREFIX=${2:-/usr/local}
echo "Cloning GeographicLib from $GIT_REPO"
TMP=$(mktemp -d)
trap 'rm -rf "$TMP"' EXIT
git clone --depth 1 "$GIT_REPO" "$TMP/GeographicLib"
mkdir -p "$TMP/GeographicLib/build"
pushd "$TMP/GeographicLib/build" >/dev/null
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX"
make -j$(nproc)
sudo make install
popd >/dev/null
echo "GeographicLib installed to $INSTALL_PREFIX"