Skip to content

Commit

Permalink
use cmake to build libxml2
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrouget committed Dec 27, 2023
1 parent ae973ea commit 3618966
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
6 changes: 0 additions & 6 deletions Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ RUN tar -xf cmake-3.26.5-linux-x86_64.tar.gz
RUN mv cmake-3.26.5-linux-x86_64 opt
ENV CMAKE_ROOT=/ffmpeg-static/opt/share/cmake-3.27

# Install a recent version of pkg-config
RUN wget https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz && \
tar -xf pkg-config-0.28.tar.gz && \
cd pkg-config-0.28 && \
./configure --with-internal-glib --prefix=/ffmpeg-static/opt && make && make install

# Install a recent version of yasm
RUN git clone https://github.com/yasm/yasm.git && \
cd yasm \
Expand Down
4 changes: 2 additions & 2 deletions docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set -euo pipefail

version=$(<VERSION)

docker build -t linux . -f ./Dockerfile.linux
docker build -t windows . -f ./Dockerfile.windows
docker build -t linux . -f ./Dockerfile.linux --progress=plain
docker build -t windows . -f ./Dockerfile.windows --progress=plain

mkdir dist

Expand Down
20 changes: 12 additions & 8 deletions recipes/libxml2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ function setup_cross {
}

function build {
./autogen.sh
./configure --prefix=$dist/$1 \
$autotools_options \
--enable-static \
--without-iconv \
--without-lzma \
--without-python
make -$MJ
mkdir build
cd build
cmake \
$cmake_options \
-DCMAKE_INSTALL_PREFIX="$dist/$1" \
-DLIBXML2_WITH_LZMA=OFF \
-DLIBXML2_WITH_ICONV=OFF \
-DLIBXML2_WITH_PYTHON=OFF \
-DLIBXML2_WITH_ZLIB=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
..
make install
}

Expand Down

0 comments on commit 3618966

Please sign in to comment.