From 29c098f2cc8f49c7f2aecddc66b19abffc1a6bb1 Mon Sep 17 00:00:00 2001 From: Khanh Hoang Date: Sun, 22 Mar 2026 02:05:50 -0700 Subject: [PATCH] Fix missing transitive deps from ffmpeg pkgconfig --- cmake/FindFFmpeg.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake index ba5c2b6c..991916f8 100644 --- a/cmake/FindFFmpeg.cmake +++ b/cmake/FindFFmpeg.cmake @@ -235,7 +235,7 @@ if (TRUE) message(STATUS "Libs: ${${_component}_LIBRARIES} | ${PC_${_component}_LIBRARIES}") # message(STATUS "Required component ${_component} present.") - set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES}) + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES} ${PC_${_component}_LINK_LIBRARIES}) set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS}) list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIRS}) @@ -246,9 +246,10 @@ if (TRUE) set_target_properties(FFmpeg::${_lowerComponent} PROPERTIES INTERFACE_COMPILE_OPTIONS "${${_component}_DEFINITIONS}" INTERFACE_INCLUDE_DIRECTORIES ${${_component}_INCLUDE_DIRS} - INTERFACE_LINK_LIBRARIES "${${_component}_LIBRARY} ${${_component}_LIBRARIES} ${PC_${_component}_LIBRARIES}" + INTERFACE_LINK_LIBRARIES "${${_component}_LIBRARY};${${_component}_LIBRARIES};${PC_${_component}_LINK_LIBRARIES}" IMPORTED_LINK_INTERFACE_MULTIPLICITY 3) endif() + list(APPEND _FFMPEG_COMPONENT_TARGETS FFmpeg::${_lowerComponent}) else() # message(STATUS "Required component ${_component} missing.") endif() @@ -271,7 +272,7 @@ if (NOT TARGET FFmpeg::FFmpeg) set_target_properties(FFmpeg PROPERTIES INTERFACE_COMPILE_OPTIONS "${FFMPEG_DEFINITIONS}" INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${FFMPEG_LIBRARIES}") + INTERFACE_LINK_LIBRARIES "${_FFMPEG_COMPONENT_TARGETS}") add_library(FFmpeg::FFmpeg ALIAS FFmpeg) endif()