Migrate the build system to cmake

This commit is contained in:
Luis Ángel San Martín Rodríguez
2026-02-25 09:19:39 +01:00
parent 5f8951ac09
commit 865020fe11
63 changed files with 1859 additions and 2060 deletions

View File

@ -14,14 +14,13 @@ RUN \
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
cmake \
desktop-file-utils \
gcc \
g++ \
git \
qt6-tools-dev \
qt6-base-dev-tools \
qmake6 \
qmake6-bin \
qt6-base-dev \
qt6-multimedia-dev \
qt6-tools-dev-tools \
@ -60,24 +59,22 @@ RUN git clone https://github.com/YACReader/yacreader.git /src/git && \
cd /src/git && \
git checkout $YACR_VERSION
# get 7zip source
RUN cd /src/git/compressed_archive && \
wget "https://github.com/YACReader/yacreader-7z-deps/blob/main/7z2301-src.7z?raw=true" -O /src/git/compressed_archive/7z2301-src.7z && \
7z x /src/git/compressed_archive/7z2301-src.7z -o/src/git/compressed_archive/lib7zip
# build yacreaderlibraryserver
RUN cd /src/git/YACReaderLibraryServer && \
qmake6 PREFIX=/app CONFIG+="7zip server_standalone" YACReaderLibraryServer.pro && \
qmake6 -v && \
make && \
make install
# build yacreaderlibraryserver (7zip source is auto-downloaded by CMake FetchContent)
RUN cd /src/git && \
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/app \
-DDECOMPRESSION_BACKEND=7zip \
-DBUILD_SERVER_STANDALONE=ON \
-DCMAKE_BUILD_TYPE=Release && \
cmake --build build --parallel && \
cmake --install build
# install 7z.so with RAR support
RUN echo "Building and installing 7z.so with RAR support..." && \
cd "/src/git/compressed_archive/lib7zip/CPP/7zip/Bundles/Format7zF" && \
make -f makefile.gcc && \
mkdir -p /app/lib/7zip && \
cp ./_o/7z.so /app/lib/7zip
cp ./_o/7z.so /app/lib/7zip
# Stage 2: Runtime stage
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble
@ -95,7 +92,7 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
libqt6core5compat6 \
libpoppler-qt6-3t64 \
qt6-image-formats-plugins \
qt6-image-formats-plugins \
libqt6network6t64 \
libqt6sql6-sqlite && \
apt-get clean && \