cmake: Fix regexp to detect installed FFmpeg version

The regexp was not tolerating a + sign is the version string,
causing configuration to fail on Ubuntu 24.04 when the installed
version is 6.1.1-3ubuntu5+esm2.
This commit is contained in:
Yann Salmon
2024-11-22 21:43:57 +01:00
committed by Ryan Foster
parent d1249cd993
commit 9b97d48573
+1 -1
View File
@@ -295,7 +295,7 @@ if(EXISTS "${FFmpeg_avutil_INCLUDE_DIR}/libavutil/ffversion.h")
STRINGS
"${FFmpeg_avutil_INCLUDE_DIR}/libavutil/ffversion.h"
_version_string
REGEX "^.*FFMPEG_VERSION[ \t]+\"n?[0-9a-z\\~.-]+\"[ \t]*$"
REGEX "^.*FFMPEG_VERSION[ \t]+\"n?[0-9a-z\\~+.-]+\"[ \t]*$"
)
string(REGEX REPLACE ".*FFMPEG_VERSION[ \t]+\"n?([0-9]+\\.[0-9]).*\".*" "\\1" FFmpeg_VERSION "${_version_string}")
endif()