1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 02:12:45 +01:00

cmake: FFmpeg: Fix regex for version detection

Fix regex to detect the "4.2.2-1+b1" version currently available on
Debian testing.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
This commit is contained in:
Paul Cercueil 2020-03-16 19:30:00 +01:00 committed by Anonymous Maarten
parent 6015cd0cd5
commit 6ab92da5b0

View File

@ -68,7 +68,7 @@ endif()
if(FFMPEG_INCLUDE_DIR)
file(READ "${FFMPEG_INCLUDE_DIR}/libavutil/ffversion.h" __FFVERSION_H)
string(REGEX MATCH "#define[ ]+FFMPEG_VERSION[ ]+\"([0-9a-zA-Z\\.\\-]+)\"" _FFMPEG_VERSION "${__FFVERSION_H}")
string(REGEX MATCH "#define[ ]+FFMPEG_VERSION[ ]+\"([0-9a-zA-Z\\+\\.\\-]+)\"" _FFMPEG_VERSION "${__FFVERSION_H}")
if(NOT _FFMPEG_VERSION)
message(AUTHOR_WARNING "Cannot detect ffmpeg version: regex does not match")
endif()