Fix avif version detection

Currently, even though libavif is found, the version of libavif will not
be printed. `find_package(libavif QUIET)` will set `libavif_VERSION`
according to cmake documentation https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-version-selection

This patch has been tested on ArchLinux with libavif 1.0.3 installed.
pull/24790/head
Letu Ren 1 year ago
parent 2e3ccb4e8e
commit 6e3685d733
  1. 4
      CMakeLists.txt

@ -1452,8 +1452,8 @@ if(WITH_WEBP OR HAVE_WEBP)
endif()
if(WITH_AVIF OR HAVE_AVIF)
if(AVIF_VERSION)
status(" AVIF:" AVIF_FOUND THEN "${AVIF_LIBRARY} (ver ${AVIF_VERSION})" ELSE "NO")
if(libavif_VERSION)
status(" AVIF:" AVIF_FOUND THEN "${AVIF_LIBRARY} (ver ${libavif_VERSION})" ELSE "NO")
else()
status(" AVIF:" AVIF_FOUND THEN "${AVIF_LIBRARY}" ELSE "NO")
endif()

Loading…
Cancel
Save