@ -116,6 +116,10 @@ function(find_ffmpeg LIBNAME)
endforeach ( )
endforeach ( )
string ( TOUPPER ${ LIBNAME } LIBNAME_UPPER )
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) " )
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]+)" )
set ( _FFmpeg_VERSION_REGEX "([0-9]+)" )
foreach ( v MAJOR MINOR MICRO )
foreach ( v MAJOR MINOR MICRO )
if ( "${_FFmpeg_VERSION_H_CONTENTS}" MATCHES "#define LIB${LIBNAME_UPPER}_VERSION_${v}[\\t ]+${_FFmpeg_VERSION_REGEX}" )
if ( "${_FFmpeg_VERSION_H_CONTENTS}" MATCHES "#define LIB${LIBNAME_UPPER}_VERSION_${v}[\\t ]+${_FFmpeg_VERSION_REGEX}" )