Change how FFmpeg is imported for Apple computers.
Imports Apple libraries and also pulls swresample in, so when compiling Dolphin doesn't throw undefined symbols.
This commit is contained in:
parent
890a5ed99a
commit
90437d1574
|
@ -488,8 +488,14 @@ if(ENCODE_FRAMEDUMPS)
|
||||||
if(WIN32 AND _M_X86_64)
|
if(WIN32 AND _M_X86_64)
|
||||||
set(FFMPEG_DIR Externals/ffmpeg)
|
set(FFMPEG_DIR Externals/ffmpeg)
|
||||||
endif()
|
endif()
|
||||||
find_package(FFmpeg COMPONENTS avcodec avformat avutil swscale)
|
find_package(FFmpeg COMPONENTS avcodec avformat avutil swresample swscale)
|
||||||
if(FFmpeg_FOUND)
|
if(FFmpeg_FOUND)
|
||||||
|
if(APPLE)
|
||||||
|
find_library(COREMEDIA_LIBRARY CoreMedia)
|
||||||
|
find_library(VIDEOTOOLBOX_LIBRARY VideoToolbox)
|
||||||
|
find_library(COREVIDEO_LIBRARY CoreVideo)
|
||||||
|
find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
|
||||||
|
endif()
|
||||||
message(STATUS "libav/ffmpeg found, enabling AVI frame dumps")
|
message(STATUS "libav/ffmpeg found, enabling AVI frame dumps")
|
||||||
add_definitions(-DHAVE_FFMPEG)
|
add_definitions(-DHAVE_FFMPEG)
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -167,6 +167,15 @@ if(FFmpeg_FOUND)
|
||||||
FFmpeg::avcodec
|
FFmpeg::avcodec
|
||||||
FFmpeg::avformat
|
FFmpeg::avformat
|
||||||
FFmpeg::avutil
|
FFmpeg::avutil
|
||||||
|
FFmpeg::swresample
|
||||||
FFmpeg::swscale
|
FFmpeg::swscale
|
||||||
)
|
)
|
||||||
|
if(APPLE)
|
||||||
|
target_link_libraries(videocommon PRIVATE
|
||||||
|
${COREMEDIA_LIBRARY}
|
||||||
|
${VIDEOTOOLBOX_LIBRARY}
|
||||||
|
${COREVIDEO_LIBRARY}
|
||||||
|
${AUDIOTOOLBOX_LIBRARY}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue