|
| 1 | +From: local Buildroot integration |
| 2 | +Subject: [PATCH 1/2] build: fix FFmpeg AVCODEC component variable name |
| 3 | + |
| 4 | +FindFFmpeg.cmake records the AVCODEC component result in the |
| 5 | +FFmpeg_AVCODEC_FOUND variable. The checks in libfreerdp use a differently |
| 6 | +cased variable, causing CMake to report AVCODEC as unavailable even after it |
| 7 | +has successfully found libavcodec. |
| 8 | + |
| 9 | +Use the component variable name provided by FindFFmpeg.cmake so that the |
| 10 | +MJPEG decoder dependencies are added explicitly. |
| 11 | + |
| 12 | +Upstream-Status: Pending |
| 13 | +--- |
| 14 | + libfreerdp/CMakeLists.txt | 4 ++-- |
| 15 | + 1 file changed, 2 insertions(+), 2 deletions(-) |
| 16 | + |
| 17 | +diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt |
| 18 | +--- a/libfreerdp/CMakeLists.txt |
| 19 | ++++ b/libfreerdp/CMakeLists.txt |
| 20 | +@@ -162,7 +162,7 @@ if(WITH_SWSCALE) |
| 21 | + # AVUTIL is needed for av_image_* functions, AVCODEC is optional (for MJPEG in video.c) |
| 22 | + find_package(FFmpeg REQUIRED COMPONENTS SWSCALE AVUTIL) |
| 23 | + find_package(FFmpeg COMPONENTS AVCODEC) |
| 24 | +- if(FFmpeg_avcodec_FOUND) |
| 25 | ++ if(FFmpeg_AVCODEC_FOUND) |
| 26 | + message(STATUS "FFmpeg AVCODEC found - MJPEG support available in video codec wrappers") |
| 27 | + set(WITH_FFMPEG ON) |
| 28 | + else() |
| 29 | +@@ -180,7 +180,7 @@ if(WITH_SWSCALE) |
| 30 | + if(NOT WITH_SWSCALE_LOADING) |
| 31 | + include_directories(SYSTEM ${SWSCALE_INCLUDE_DIRS} ${AVUTIL_INCLUDE_DIRS}) |
| 32 | + freerdp_library_add(${SWSCALE_LIBRARIES} ${AVUTIL_LIBRARIES}) |
| 33 | +- if(FFmpeg_avcodec_FOUND) |
| 34 | ++ if(FFmpeg_AVCODEC_FOUND) |
| 35 | + include_directories(SYSTEM ${AVCODEC_INCLUDE_DIRS}) |
| 36 | + freerdp_library_add(${AVCODEC_LIBRARIES}) |
| 37 | + endif() |
| 38 | +-- |
| 39 | +2.39.5 |
0 commit comments