Skip to content

Commit

Permalink
Fix backward compatibility of AVIF_LOCAL_RAV1E (AOMediaCodec#1807)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrabaud authored Nov 24, 2023
1 parent 99f4dbb commit 959109d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ option(AVIF_ENABLE_EXPERIMENTAL_AVIR "Enable experimental reduced header" OFF)
function(set_local_or_system_option VAR DEFAULT TEXT)
# Deal with the older way of setting options.
if(DEFINED AVIF_LOCAL_${VAR})
if(AVIF_LOCAL_${CODEC})
if(AVIF_LOCAL_${VAR})
set(DEFAULT "LOCAL")
else()
set(DEFAULT "SYSTEM")
Expand All @@ -68,7 +68,8 @@ function(set_codec_option CODEC NAME ENCDEC EXTRA)
else()
set(DEFAULT "OFF")
endif()
set_local_or_system_option("CODEC_${CODEC}" ${DEFAULT} "Use the ${NAME} codec for ${ENCDEC}${EXTRA}")
set(AVIF_CODEC_${CODEC} ${DEFAULT} CACHE STRING "Use the ${NAME} codec for ${ENCDEC}${EXTRA}" FORCE)
set_property(CACHE AVIF_CODEC_${CODEC} PROPERTY STRINGS OFF LOCAL SYSTEM)
endfunction()
set_codec_option(AOM "AOM" "encoding/decoding" " (see AVIF_CODEC_AOM_DECODE/AVIF_CODEC_AOM_ENCODE)")
set_codec_option(DAV1D "dav1d" "decoding" "")
Expand Down

0 comments on commit 959109d

Please sign in to comment.