Skip to content

Commit

Permalink
cmake: Fix regexp to detect installed FFmpeg version
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ysalmon authored and RytoEX committed Feb 5, 2025
1 parent d1249cd commit 9b97d48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/finders/FindFFmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9b97d48

Please sign in to comment.