libobs: Stop configure if ImageMagick is preferred, but not found
With certain combinations of CMake (<3.9) and ImageMagick (>=7), configure will silently fail setting up support for ImageMagick, even if the user requested for it, and the build will move on (as long as FFMPEG_AVCODEC is found). This commit adds a check that will stop configure in such cases. Closes jp9000/obs-studio#1018
This commit is contained in:
@@ -32,6 +32,8 @@ find_package(ImageMagick QUIET COMPONENTS MagickCore)
|
||||
|
||||
if(NOT ImageMagick_MagickCore_FOUND AND NOT FFMPEG_AVCODEC_FOUND)
|
||||
message(FATAL_ERROR "Either MagickCore or Libavcodec is required, but both were not found")
|
||||
elseif(NOT ImageMagick_MagickCore_FOUND AND LIBOBS_PREFER_IMAGEMAGICK)
|
||||
message(FATAL_ERROR "ImageMagick support was requested, but was not found.")
|
||||
endif()
|
||||
|
||||
option(LIBOBS_PREFER_IMAGEMAGICK "Prefer ImageMagick over ffmpeg for image loading" OFF)
|
||||
|
Reference in New Issue
Block a user