From 2a8d5c12234a541ebe1d769c3fea97e279e02c1c Mon Sep 17 00:00:00 2001 From: Yannis Guyon Date: Wed, 10 Jan 2024 17:52:30 +0100 Subject: [PATCH 1/3] Add build command lines to README.md They should work for both Windows and Unix environments. [skip-ci] --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 2af92ee460..267d8ef847 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,41 @@ The remaining tests can be built by enabling the `AVIF_BUILD_TESTS` and `AVIF_ENABLE_GTEST` CMake options. They require GoogleTest to be built locally with ext/googletest.cmd or installed on the system. +### Command Lines + +The following instructions can be used to build the libavif library and the +`avifenc` and `avifdec` tools. + +#### Build using installed dependencies + +To link against the already installed `aom`, `libjpeg` and `libpng` dependency +libraries (recommended): + +```sh +git clone -b v1.0.3 https://github.com/AOMediaCodec/libavif.git +mkdir libavif/build +cd libavif/build +cmake .. -DAVIF_CODEC_AOM=SYSTEM -DAVIF_BUILD_APPS=ON +cmake --build . -- -j +``` + +#### Build everything from scratch + +For development and debugging purposes, or to generate fully static binaries: + +```sh +git clone -b v1.0.3 https://github.com/AOMediaCodec/libavif.git +cd libavif/ext +./aom.cmd +./libyuv.cmd +./libjpeg.cmd +./zlibpng.cmd +mkdir ../build +cd ../build +cmake .. -DBUILD_SHARED_LIBS=OFF -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=LOCAL -DAVIF_LOCAL_JPEG=ON -DAVIF_LOCAL_ZLIBPNG=ON -DAVIF_BUILD_APPS=ON +cmake --build . -- -j +``` + ## Prebuilt Library (Windows) If you're building on Windows with Visual Studio 2022 and want to try out From 4f3f89785c62b4e4185a33e3d69f083c5251ab12 Mon Sep 17 00:00:00 2001 From: Yannis Guyon Date: Thu, 11 Jan 2024 13:31:34 +0100 Subject: [PATCH 2/3] Use cmake flags instead of mkdir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com> --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 267d8ef847..1d92cd8c23 100644 --- a/README.md +++ b/README.md @@ -81,10 +81,9 @@ libraries (recommended): ```sh git clone -b v1.0.3 https://github.com/AOMediaCodec/libavif.git -mkdir libavif/build -cd libavif/build -cmake .. -DAVIF_CODEC_AOM=SYSTEM -DAVIF_BUILD_APPS=ON -cmake --build . -- -j +cd libavif +cmake -S . -B build -DAVIF_CODEC_AOM=SYSTEM -DAVIF_BUILD_APPS=ON +cmake --build build --parallel ``` #### Build everything from scratch From 3fa10756f7c86171857cd585c11ab95cbfe12920 Mon Sep 17 00:00:00 2001 From: Yannis Guyon Date: Thu, 11 Jan 2024 13:32:11 +0100 Subject: [PATCH 3/3] Use cmake flags instead of mkdir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [skip-ci] Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com> --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1d92cd8c23..4c997602e3 100644 --- a/README.md +++ b/README.md @@ -97,10 +97,9 @@ cd libavif/ext ./libyuv.cmd ./libjpeg.cmd ./zlibpng.cmd -mkdir ../build -cd ../build -cmake .. -DBUILD_SHARED_LIBS=OFF -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=LOCAL -DAVIF_LOCAL_JPEG=ON -DAVIF_LOCAL_ZLIBPNG=ON -DAVIF_BUILD_APPS=ON -cmake --build . -- -j +cd .. +cmake -S . -B build -DBUILD_SHARED_LIBS=OFF -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=LOCAL -DAVIF_LOCAL_JPEG=ON -DAVIF_LOCAL_ZLIBPNG=ON -DAVIF_BUILD_APPS=ON +cmake --build build --parallel ``` ## Prebuilt Library (Windows)