mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-05 05:56:53 +03:00
920dc1ba53
This lets us select a proper host compiler version if cc/cxx are not suitable for building Lagom.
28 lines
715 B
Bash
Executable File
28 lines
715 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eo pipefail
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
SERENITY_ROOT="$(realpath "${DIR}"/../..)"
|
|
|
|
# shellcheck source=/dev/null
|
|
. "${SERENITY_ROOT}/Meta/shell_include.sh"
|
|
|
|
# shellcheck source=/dev/null
|
|
. "${SERENITY_ROOT}/Meta/find_compiler.sh"
|
|
|
|
pick_host_compiler
|
|
|
|
BUILD_DIR=${BUILD_DIR:-"${SERENITY_ROOT}/Build"}
|
|
CACHE_DIR=${CACHE_DIR:-"${BUILD_DIR}/caches"}
|
|
|
|
cmake -S "$SERENITY_ROOT/Meta/Lagom" -B "$BUILD_DIR/lagom-tools" \
|
|
-GNinja -Dpackage=LagomTools \
|
|
-DCMAKE_INSTALL_PREFIX="$BUILD_DIR/lagom-tools-install" \
|
|
-DCMAKE_C_COMPILER="$CC" \
|
|
-DCMAKE_CXX_COMPILER="$CXX" \
|
|
-DSERENITY_CACHE_DIR="$CACHE_DIR"
|
|
|
|
ninja -C "$BUILD_DIR/lagom-tools" install
|