mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-01 15:49:51 +08:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user