mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-27 02:09:14 -05:00
Merge pull request #575 from StefanBruens/fix_ffmpeg_detection
Use CMake varialbles instead of depending on FFmpeg binary
This commit is contained in:
commit
24ca0f0d56
@ -30,20 +30,16 @@ if(NOT SERVER_MODE)
|
|||||||
# libavutil 55.27.100
|
# libavutil 55.27.100
|
||||||
# libavcodec 57.48.101
|
# libavcodec 57.48.101
|
||||||
# libavformat 57.40.101
|
# libavformat 57.40.101
|
||||||
# TODO use libavcodec/version.h
|
find_package(FFmpeg COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE)
|
||||||
find_package(FFmpeg)
|
|
||||||
if (FFMPEG_FOUND)
|
if (FFMPEG_FOUND)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_subdirectory(demoddatv)
|
add_subdirectory(demoddatv)
|
||||||
else()
|
else()
|
||||||
# You can only get FFmpeg version from the command line
|
if((AVUTIL_VERSION VERSION_GREATER "55.27.99") AND (AVCODEC_VERSION VERSION_GREATER "57.48.101"))
|
||||||
EXECUTE_PROCESS(COMMAND ffmpeg -version COMMAND grep ffmpeg COMMAND cut -d\ -f3 COMMAND tr -d '\n' OUTPUT_VARIABLE FFMPEG_VERSION)
|
|
||||||
message(STATUS "FFmpeg version ${FFMPEG_VERSION} found")
|
|
||||||
if(FFMPEG_VERSION VERSION_GREATER "3.1")
|
|
||||||
message(STATUS "Include demoddatv")
|
message(STATUS "Include demoddatv")
|
||||||
add_subdirectory(demoddatv)
|
add_subdirectory(demoddatv)
|
||||||
else()
|
else()
|
||||||
message(STATUS "FFmpeg too old to compile demoddatv; needs at least ffmpeg 3.1")
|
message(STATUS "FFmpeg too old to compile demoddatv; needs at least avutil: 55.27.100, avcodec/avformat: 57.48.101")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user