mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-22 10:10:04 +00:00
Look at version_major.h when for newer ffmpeg libs
In ffmpeg 5.1, it seems most (or all) of these libraries use a separate version_major.h, so the logic to check minimum version didn't work without looking at the major version file.
This commit is contained in:
parent
58d0705f0f
commit
a90b0daebe
4
externals/cmake-modules/FindFFmpeg.cmake
vendored
4
externals/cmake-modules/FindFFmpeg.cmake
vendored
@ -116,6 +116,10 @@ function(find_ffmpeg LIBNAME)
|
||||
endforeach()
|
||||
string(TOUPPER ${LIBNAME} LIBNAME_UPPER)
|
||||
file(STRINGS "${FFmpeg_INCLUDE_${LIBNAME}}/lib${LIBNAME}/version.h" _FFmpeg_VERSION_H_CONTENTS REGEX "#define LIB${LIBNAME_UPPER}_VERSION_(MAJOR|MINOR|MICRO) ")
|
||||
if (EXISTS "${FFmpeg_INCLUDE_${LIBNAME}}/lib${LIBNAME}/version_major.h")
|
||||
file(STRINGS "${FFmpeg_INCLUDE_${LIBNAME}}/lib${LIBNAME}/version_major.h" _FFmpeg_MAJOR_VERSION_H_CONTENTS REGEX "#define LIB${LIBNAME_UPPER}_VERSION_MAJOR ")
|
||||
string(APPEND _FFmpeg_VERSION_H_CONTENTS "\n" ${_FFmpeg_MAJOR_VERSION_H_CONTENTS})
|
||||
endif()
|
||||
set(_FFmpeg_VERSION_REGEX "([0-9]+)")
|
||||
foreach(v MAJOR MINOR MICRO)
|
||||
if("${_FFmpeg_VERSION_H_CONTENTS}" MATCHES "#define LIB${LIBNAME_UPPER}_VERSION_${v}[\\t ]+${_FFmpeg_VERSION_REGEX}")
|
||||
|
Loading…
Reference in New Issue
Block a user