This commit is contained in:
@ -1,5 +1,9 @@
|
||||
FROM --platform=$BUILDPLATFORM alpine:latest AS builder
|
||||
|
||||
# Add build arguments for platform
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
|
||||
# Install build dependencies
|
||||
RUN apk add --no-cache \
|
||||
build-base \
|
||||
@ -27,7 +31,8 @@ RUN cmake -G Ninja -B build_static -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_COMPILER=g++ \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-static" \
|
||||
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=${TARGETPLATFORM#linux/}
|
||||
|
||||
RUN cmake --build build_static
|
||||
|
||||
|
Reference in New Issue
Block a user