Skip to content

Commit

Permalink
cmake: require at least libavif 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed Jan 24, 2024
1 parent 8fb71f5 commit fbfc1e5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ option(SDL3IMAGE_XV "Support loading XV images" ON)
cmake_dependent_option(SDL3IMAGE_JPG_SAVE "Add JPEG save support" ON SDL3IMAGE_JPG OFF)
cmake_dependent_option(SDL3IMAGE_PNG_SAVE "Add PNG save support" ON SDL3IMAGE_PNG OFF)

set(LIBAVIF_MINIMUM_VERSION "0.9.3")
set(LIBAVIF_MINIMUM_VERSION "1.0")
if(SDL3IMAGE_VENDORED AND SDL3IMAGE_AVIF)
set(SDL3IMAGE_AVIF_VENDORED ON)
else()
Expand Down Expand Up @@ -445,15 +445,12 @@ if(SDL3IMAGE_AVIF)
endif()
endif()
else()
find_package(libavif 1.0 QUIET)
if(NOT libavif_FOUND)
find_package(libavif ${LIBAVIF_MINIMUM_VERSION} QUIET)
endif()
find_package(libavif "${LIBAVIF_MINIMUM_VERSION}" QUIET ${required})
if(libavif_FOUND)
message(STATUS "${PROJECT_NAME}: Using system libavif")
set(SDL3IMAGE_AVIF_ENABLED TRUE)
if(NOT SDL3IMAGE_AVIF_SHARED)
list(APPEND PC_REQUIRES libavif)
list(APPEND PC_REQUIRES "libavif >= ${LIBAVIF_MINIMUM_VERSION}")
endif()
else()
message(STATUS "libavif-${LIBAVIF_MINIMUM_VERSION} or compatible not found")
Expand Down

0 comments on commit fbfc1e5

Please sign in to comment.