CMake: libav/ffmpeg cleanups
Use @Orphis's FindFFmpeg module from ppsspp: https://github.com/hrydgard/ppsspp/commit/2149d3db7fb960d140bdee31a9f0f4837934127b From that commit: > This new module should be able to handle both libraries in the regular > paths and fallback to pkg-config. > It is also able to find dynamic libraries, not just static libraries. > It will generate imported targets with the name FFmpeg::<lib> that you > can use in your scripts.
This commit is contained in:
@@ -62,12 +62,14 @@ else()
|
||||
set(SRCS ${SRCS} TextureDecoder_Generic.cpp)
|
||||
endif()
|
||||
|
||||
if(LIBAV_FOUND OR WIN32)
|
||||
set(SRCS ${SRCS} AVIDump.cpp)
|
||||
endif()
|
||||
|
||||
add_dolphin_library(videocommon "${SRCS}" "${LIBS}")
|
||||
|
||||
if(LIBAV_FOUND)
|
||||
target_link_libraries(videocommon PRIVATE ${LIBS} ${LIBAV_LIBRARIES})
|
||||
if(FFmpeg_FOUND)
|
||||
target_sources(videocommon PRIVATE AVIDump.cpp)
|
||||
target_link_libraries(videocommon PRIVATE
|
||||
FFmpeg::avcodec
|
||||
FFmpeg::avformat
|
||||
FFmpeg::avutil
|
||||
FFmpeg::swscale
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user