mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-12-18 01:15:52 +01:00
fixed system ffmpeg detection
This commit is contained in:
parent
78f6ecf660
commit
e7e6365bdd
@ -2,9 +2,9 @@ if(USE_FFMPEG)
|
||||
if(NOT FFMPEG_PATH AND NOT BUILD_STATIC)
|
||||
# FFmpeg detection
|
||||
if(WIN32)
|
||||
find_package(FFmpeg)
|
||||
find_package(FFmpeg COMPONENTS AVFORMAT AVUTIL AVCODEC SWRESAMPLE)
|
||||
else()
|
||||
find_package(FFmpeg QUIET)
|
||||
find_package(FFmpeg QUIET COMPONENTS AVFORMAT AVUTIL AVCODEC SWRESAMPLE)
|
||||
endif()
|
||||
|
||||
if(NOT FFMPEG_LIBRARIES)
|
||||
@ -15,23 +15,30 @@ if(USE_FFMPEG)
|
||||
endif()
|
||||
else()
|
||||
if(${AVCODEC_VERSION} VERSION_LESS 57)
|
||||
message("libavcodec version mismatch ${AVCODEC_VERSION} expected >=57")
|
||||
if(WIN32)
|
||||
set_ffmpeg(OFF TRUE)
|
||||
message("libavcodec version mismatch ${AVCODEC_VERSION} expected >=57")
|
||||
else()
|
||||
set(FFmpeg_FOUND NO)
|
||||
endif()
|
||||
elseif(${AVUTIL_VERSION} VERSION_LESS 55)
|
||||
message("libavutil version mismatch ${AVUTIL_VERSION} expected >=55")
|
||||
if(WIN32)
|
||||
set_ffmpeg(OFF TRUE)
|
||||
message("libavutil version mismatch ${AVUTIL_VERSION} expected >=55")
|
||||
else()
|
||||
set(FFmpeg_FOUND NO)
|
||||
endif()
|
||||
elseif(${SWRESAMPLE_VERSION} VERSION_LESS 2)
|
||||
message("libswresample version mismatch ${SWRESAMPLE_VERSION} expected >=2")
|
||||
if(WIN32)
|
||||
set_ffmpeg(OFF TRUE)
|
||||
else()
|
||||
set(FFmpeg_FOUND NO)
|
||||
endif()
|
||||
elseif(${AVFORMAT_VERSION} VERSION_LESS 57)
|
||||
message("libavformat version mismatch ${AVFORMAT_VERSION} expected >=57")
|
||||
if(WIN32)
|
||||
set_ffmpeg(OFF TRUE)
|
||||
message("libswresample version mismatch ${SWRESAMPLE_VERSION} expected >=2")
|
||||
else()
|
||||
set(FFmpeg_FOUND NO)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user