Skip to content

Commit feb542d

Browse files
y-guyonkmilos
andauthored
Add build command lines to README.md (#1924)
Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com>
1 parent acaab91 commit feb542d

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,39 @@ The remaining tests can be built by enabling the `AVIF_BUILD_TESTS` and
6969
`AVIF_ENABLE_GTEST` CMake options. They require GoogleTest to be built locally
7070
with ext/googletest.cmd or installed on the system.
7171

72+
### Command Lines
73+
74+
The following instructions can be used to build the libavif library and the
75+
`avifenc` and `avifdec` tools.
76+
77+
#### Build using installed dependencies
78+
79+
To link against the already installed `aom`, `libjpeg` and `libpng` dependency
80+
libraries (recommended):
81+
82+
```sh
83+
git clone -b v1.0.3 https://github.com/AOMediaCodec/libavif.git
84+
cd libavif
85+
cmake -S . -B build -DAVIF_CODEC_AOM=SYSTEM -DAVIF_BUILD_APPS=ON
86+
cmake --build build --parallel
87+
```
88+
89+
#### Build everything from scratch
90+
91+
For development and debugging purposes, or to generate fully static binaries:
92+
93+
```sh
94+
git clone -b v1.0.3 https://github.com/AOMediaCodec/libavif.git
95+
cd libavif/ext
96+
./aom.cmd
97+
./libyuv.cmd
98+
./libjpeg.cmd
99+
./zlibpng.cmd
100+
cd ..
101+
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
102+
cmake --build build --parallel
103+
```
104+
72105
## Prebuilt Library (Windows)
73106

74107
If you're building on Windows with Visual Studio 2022 and want to try out

0 commit comments

Comments
 (0)