Browse Source

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.
Yann Salmon 11 months ago
parent
commit
9b97d48573
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cmake/finders/FindFFmpeg.cmake

+ 1 - 1
cmake/finders/FindFFmpeg.cmake

@@ -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()