1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Use CMake's -B, --build, and --install options

This commit is contained in:
ShadowNinja 2022-01-31 19:42:24 -05:00 committed by rubenwardy
parent f5e54cd398
commit 24a0f55c9c
6 changed files with 22 additions and 33 deletions

View file

@ -27,23 +27,20 @@ RUN apk add --no-cache git build-base cmake sqlite-dev curl-dev zlib-dev zstd-de
WORKDIR /usr/src/
RUN git clone --recursive https://github.com/jupp0r/prometheus-cpp/ && \
mkdir prometheus-cpp/build && \
cd prometheus-cpp/build && \
cmake .. \
cd prometheus-cpp && \
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_TESTING=0 \
-GNinja && \
ninja && \
ninja install
cmake --build build && \
cmake --install build
RUN git clone --depth=1 https://github.com/minetest/irrlicht/ -b ${IRRLICHT_VERSION} && \
cp -r irrlicht/include /usr/include/irrlichtmt
WORKDIR /usr/src/minetest
RUN mkdir build && \
cd build && \
cmake .. \
RUN cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SERVER=TRUE \
@ -51,8 +48,8 @@ RUN mkdir build && \
-DBUILD_UNITTESTS=FALSE \
-DBUILD_CLIENT=FALSE \
-GNinja && \
ninja && \
ninja install
cmake --build build && \
cmake --install build
ARG DOCKER_IMAGE=alpine:3.14
FROM $DOCKER_IMAGE AS runtime