CMake: Migrate FFmpeg package detection
This commit is contained in:
parent
72d668e05a
commit
3210302caf
|
|
@ -466,18 +466,6 @@ option(HAVE_VIDEO4LINUX
|
|||
"Set this to enable webcam support on Linux." ${IS_LINUX})
|
||||
|
||||
|
||||
# Is FFMPEG installed, and where?
|
||||
find_package(FFMPEG QUIET)
|
||||
find_package(SWScale QUIET)
|
||||
find_package(SWResample QUIET)
|
||||
|
||||
package_option(FFMPEG
|
||||
"Enables support for audio- and video-decoding using the FFMPEG library.")
|
||||
package_option(SWSCALE
|
||||
"Enables support for FFMPEG's libswscale for video rescaling.")
|
||||
package_option(SWRESAMPLE
|
||||
"Enables support for FFMPEG's libresample for audio resampling.")
|
||||
|
||||
# Is ODE installed, and where?
|
||||
find_package(ODE QUIET)
|
||||
|
||||
|
|
|
|||
|
|
@ -291,12 +291,6 @@ else()
|
|||
message("- Did not find OpenCV")
|
||||
endif()
|
||||
|
||||
if(HAVE_FFMPEG)
|
||||
message("+ FFMPEG")
|
||||
else()
|
||||
message("- Did not find FFMPEG")
|
||||
endif()
|
||||
|
||||
if(HAVE_ODE)
|
||||
message("+ ODE")
|
||||
else()
|
||||
|
|
|
|||
|
|
@ -146,6 +146,33 @@ package_option(ZLIB
|
|||
|
||||
config_package(ZLIB "zlib")
|
||||
|
||||
#
|
||||
# ------------ FFmpeg ------------
|
||||
#
|
||||
|
||||
find_package(FFMPEG QUIET)
|
||||
find_package(SWScale QUIET)
|
||||
find_package(SWResample QUIET)
|
||||
|
||||
package_option(FFMPEG
|
||||
"Enables support for audio- and video-decoding using the FFmpeg library.")
|
||||
package_option(SWSCALE
|
||||
"Enables support for FFmpeg's libswscale for video rescaling.")
|
||||
package_option(SWRESAMPLE
|
||||
"Enables support for FFmpeg's libresample for audio resampling.")
|
||||
|
||||
if(HAVE_SWSCALE AND HAVE_SWRESAMPLE)
|
||||
set(ffmpeg_features "with swscale and swresample")
|
||||
elseif(HAVE_SWSCALE)
|
||||
set(ffmpeg_features "with swscale")
|
||||
elseif(HAVE_SWRESAMPLE)
|
||||
set(ffmpeg_features "with swresample")
|
||||
else()
|
||||
set(ffmpeg_features "without resampling/rescaling support")
|
||||
endif()
|
||||
config_package(FFMPEG "FFmpeg" "${ffmpeg_features}")
|
||||
|
||||
|
||||
# Find and configure Miles Sound System
|
||||
find_package(Miles QUIET)
|
||||
#config_package(RAD_MSS "Miles Sound System")
|
||||
|
|
|
|||
Loading…
Reference in New Issue