Skip to content

Commit 29c098f

Browse files
committed
Fix missing transitive deps from ffmpeg pkgconfig
1 parent b56c4fd commit 29c098f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cmake/FindFFmpeg.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ if (TRUE)
235235
message(STATUS "Libs: ${${_component}_LIBRARIES} | ${PC_${_component}_LIBRARIES}")
236236

237237
# message(STATUS "Required component ${_component} present.")
238-
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES})
238+
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES} ${PC_${_component}_LINK_LIBRARIES})
239239
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS})
240240

241241
list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIRS})
@@ -246,9 +246,10 @@ if (TRUE)
246246
set_target_properties(FFmpeg::${_lowerComponent} PROPERTIES
247247
INTERFACE_COMPILE_OPTIONS "${${_component}_DEFINITIONS}"
248248
INTERFACE_INCLUDE_DIRECTORIES ${${_component}_INCLUDE_DIRS}
249-
INTERFACE_LINK_LIBRARIES "${${_component}_LIBRARY} ${${_component}_LIBRARIES} ${PC_${_component}_LIBRARIES}"
249+
INTERFACE_LINK_LIBRARIES "${${_component}_LIBRARY};${${_component}_LIBRARIES};${PC_${_component}_LINK_LIBRARIES}"
250250
IMPORTED_LINK_INTERFACE_MULTIPLICITY 3)
251251
endif()
252+
list(APPEND _FFMPEG_COMPONENT_TARGETS FFmpeg::${_lowerComponent})
252253
else()
253254
# message(STATUS "Required component ${_component} missing.")
254255
endif()
@@ -271,7 +272,7 @@ if (NOT TARGET FFmpeg::FFmpeg)
271272
set_target_properties(FFmpeg PROPERTIES
272273
INTERFACE_COMPILE_OPTIONS "${FFMPEG_DEFINITIONS}"
273274
INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_INCLUDE_DIRS}"
274-
INTERFACE_LINK_LIBRARIES "${FFMPEG_LIBRARIES}")
275+
INTERFACE_LINK_LIBRARIES "${_FFMPEG_COMPONENT_TARGETS}")
275276
add_library(FFmpeg::FFmpeg ALIAS FFmpeg)
276277
endif()
277278

0 commit comments

Comments
 (0)