summaryrefslogtreecommitdiff
path: root/cJSON
diff options
context:
space:
mode:
Diffstat (limited to 'cJSON')
-rw-r--r--cJSON/1.7.18/Dockerfile9
1 files changed, 5 insertions, 4 deletions
diff --git a/cJSON/1.7.18/Dockerfile b/cJSON/1.7.18/Dockerfile
index 3c33760..f83aad4 100644
--- a/cJSON/1.7.18/Dockerfile
+++ b/cJSON/1.7.18/Dockerfile
@@ -1,5 +1,6 @@
FROM alpine as base
-ARG PREFIX=/opt/spm/cjson-1.7.18
+ARG PREFIX=/usr/local
+ARG DESTDIR=/opt/spm/cjson-1.7.18
RUN apk update && apk add \
git \
cmake \
@@ -10,10 +11,10 @@ RUN git clone --depth 1 -b v1.7.18 https://github.com/DaveGamble/cJSON
WORKDIR /cJSON
RUN cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=$PREFIX \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_FLAGS="-ffunction-sections -fdata-sections"
RUN cmake --build build/ --parallel $(nproc --all)
-RUN cmake --install build/
+WORKDIR build
+RUN make install DESTDIR=$DESTDIR
FROM scratch
-COPY --from=base /opt/spm/cjson-1.7.18 /opt/spm/cjson-1.7.18
+COPY --from=base /opt/spm/cjson-1.7.18/usr/local /opt/spm/cjson-1.7.18