diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-08-01 02:22:23 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-08-01 02:22:23 +0200 |
| commit | 7ee0f72aabbe10d511a69b499f35f9be205df043 (patch) | |
| tree | 0987b4685e495197b8852be9ac221345bc1ae1e5 /cJSON | |
| parent | fbaa9c73773b02e1f3650860b1f55c4306b4f9c5 (diff) | |
Add cJSON-1.7.18
Diffstat (limited to 'cJSON')
| -rw-r--r-- | cJSON/1.7.18/Dockerfile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cJSON/1.7.18/Dockerfile b/cJSON/1.7.18/Dockerfile new file mode 100644 index 0000000..3c33760 --- /dev/null +++ b/cJSON/1.7.18/Dockerfile @@ -0,0 +1,19 @@ +FROM alpine as base +ARG PREFIX=/opt/spm/cjson-1.7.18 +RUN apk update && apk add \ + git \ + cmake \ + make \ + gcc \ + musl-dev +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/ +FROM scratch +COPY --from=base /opt/spm/cjson-1.7.18 /opt/spm/cjson-1.7.18 |
