mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-12-18 09:25:53 +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)
|
if(NOT FFMPEG_PATH AND NOT BUILD_STATIC)
|
||||||
# FFmpeg detection
|
# FFmpeg detection
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
find_package(FFmpeg)
|
find_package(FFmpeg COMPONENTS AVFORMAT AVUTIL AVCODEC SWRESAMPLE)
|
||||||
else()
|
else()
|
||||||
find_package(FFmpeg QUIET)
|
find_package(FFmpeg QUIET COMPONENTS AVFORMAT AVUTIL AVCODEC SWRESAMPLE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT FFMPEG_LIBRARIES)
|
if(NOT FFMPEG_LIBRARIES)
|
||||||
@ -15,23 +15,30 @@ if(USE_FFMPEG)
|
|||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if(${AVCODEC_VERSION} VERSION_LESS 57)
|
if(${AVCODEC_VERSION} VERSION_LESS 57)
|
||||||
|
message("libavcodec version mismatch ${AVCODEC_VERSION} expected >=57")
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_ffmpeg(OFF TRUE)
|
set_ffmpeg(OFF TRUE)
|
||||||
message("libavcodec version mismatch ${AVCODEC_VERSION} expected >=57")
|
|
||||||
else()
|
else()
|
||||||
set(FFmpeg_FOUND NO)
|
set(FFmpeg_FOUND NO)
|
||||||
endif()
|
endif()
|
||||||
elseif(${AVUTIL_VERSION} VERSION_LESS 55)
|
elseif(${AVUTIL_VERSION} VERSION_LESS 55)
|
||||||
|
message("libavutil version mismatch ${AVUTIL_VERSION} expected >=55")
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_ffmpeg(OFF TRUE)
|
set_ffmpeg(OFF TRUE)
|
||||||
message("libavutil version mismatch ${AVUTIL_VERSION} expected >=55")
|
|
||||||
else()
|
else()
|
||||||
set(FFmpeg_FOUND NO)
|
set(FFmpeg_FOUND NO)
|
||||||
endif()
|
endif()
|
||||||
elseif(${SWRESAMPLE_VERSION} VERSION_LESS 2)
|
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)
|
if(WIN32)
|
||||||
set_ffmpeg(OFF TRUE)
|
set_ffmpeg(OFF TRUE)
|
||||||
message("libswresample version mismatch ${SWRESAMPLE_VERSION} expected >=2")
|
|
||||||
else()
|
else()
|
||||||
set(FFmpeg_FOUND NO)
|
set(FFmpeg_FOUND NO)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user