Skip to content

Commit

Permalink
Require libyuv by default. (#2020)
Browse files Browse the repository at this point in the history
It can still be disabled with -DAVIF_LIBYUV=OFF.
b/325476398
  • Loading branch information
vrabaud committed Feb 21, 2024
1 parent da359e7 commit e82375f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci-unix-shared-installed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
- name: Set GCC & G++ compiler (on Linux)
if: runner.os == 'Linux'
run: echo "CC=gcc-${{matrix.gcc}}" >> $GITHUB_ENV && echo "CXX=g++-${{matrix.gcc}}" >> $GITHUB_ENV
- name: Disable libyuv on macOS
# TODO(yguyon): Install libyuv (not available with brew).
if: runner.os == 'macOS'
run: echo "CMAKE_AVIF_FLAGS=\"-DAVIF_LIBYUV=OFF\"" >> $GITHUB_ENV

- name: Cache external dependencies
id: cache-ext
Expand All @@ -54,7 +58,6 @@ jobs:
run: brew install aom dav1d imagemagick
- name: Print ImageMagick version
run: convert --version
# TODO(yguyon): Install libyuv (not available with brew).

# `sudo apt-get install googletest libgtest-dev` leads to the following:
# "libgtest.a(gtest-all.cc.o): undefined reference to `std::__throw_bad_array_new_length()'"
Expand All @@ -76,7 +79,7 @@ jobs:
-DAVIF_BUILD_EXAMPLES=ON -DAVIF_BUILD_APPS=ON
-DAVIF_BUILD_TESTS=ON -DAVIF_ENABLE_GTEST=ON -DAVIF_LOCAL_GTEST=ON
-DAVIF_BUILD_GDK_PIXBUF=ON -DCMAKE_INSTALL_PREFIX=./install
-DAVIF_ENABLE_WERROR=ON
-DAVIF_ENABLE_WERROR=ON ${{ env.CMAKE_AVIF_FLAGS }}
- name: Build libavif (ninja)
working-directory: ./build
run: ninja
Expand Down Expand Up @@ -114,7 +117,8 @@ jobs:
-DAVIF_ENABLE_WUNUSED_RESULT=ON -DAVIF_ENABLE_WERROR=ON
-DAVIF_BUILD_EXAMPLES=ON -DAVIF_BUILD_APPS=ON
-DAVIF_BUILD_TESTS=ON -DAVIF_ENABLE_GTEST=ON -DAVIF_LOCAL_GTEST=ON
-DAVIF_BUILD_GDK_PIXBUF=ON -DCMAKE_INSTALL_PREFIX=./install
-DAVIF_BUILD_GDK_PIXBUF=ON ${{ env.CMAKE_AVIF_FLAGS }}
-DCMAKE_INSTALL_PREFIX=./install
- name: Build libavif with [[nodiscard]] (ninja)
working-directory: ./build_nodiscard
run: ninja
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ The changes are relative to the previous release, unless the baseline is specifi
* Add enum aliases AVIF_COLOR_PRIMARIES_SRGB, AVIF_COLOR_PRIMARIES_BT2100,
AVIF_COLOR_PRIMARIES_DCI_P3, AVIF_TRANSFER_CHARACTERISTICS_PQ.
* Add avifResult enum entry AVIF_RESULT_INTERNAL_ERROR.
* Require libyuv by default (but it can still be disabled with
-DAVIF_LIBYUV=OFF).

### Changed since 1.0.0
* Update aom.cmd: v3.8.1
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ if(AVIF_JPEG STREQUAL "LOCAL")
include(LocalJpeg)
endif()

set_local_or_system_option("LIBYUV" "OFF" "Use libyuv.")
set_local_or_system_option("LIBYUV" "SYSTEM" "Use libyuv.")
check_avif_option(AVIF_LIBYUV TARGET yuv::yuv PKG_NAME libyuv)
if(AVIF_LIBYUV_ENABLED)
# libyuv 1755 exposed all of the I*Matrix() functions, which libavif relies on.
Expand Down

0 comments on commit e82375f

Please sign in to comment.