MESSAGE(STATUS "define IMAGE_MAGICK_MAJOR: " ${IMAGE_MAGICK_MAJOR})
ADD_COMPILE_DEFINITIONS(IMAGE_MAGICK_MAJOR=${IMAGE_MAGICK_MAJOR})
+IF(${IMAGE_MAGICK_MAJOR} EQUAL 7)
+ LIST(APPEND ImageMagick_INCLUDE_DIRS "/usr/include/x86_64-linux-gnu/ImageMagick-7")
+ENDIF()
+
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX "/" CACHE PATH "install prefix" FORCE)
ENDIF()
#if IMAGE_MAGICK_MAJOR == 6
#include <magick/MagickCore.h>
#endif
+#if IMAGE_MAGICK_MAJOR == 7
+#include <MagickCore/MagickCore.h>
+#endif
#include "kds_s2000w_image_converter.h"
#ifndef NODEBUG
sprintf(image_info->filename, "streamout.pnm");
if (depth > -1)
+#if IMAGE_MAGICK_MAJOR == 6
SetImageDepth(input_image, depth);
+#endif
+#if IMAGE_MAGICK_MAJOR == 7
+ SetImageDepth(input_image, depth, exception);
+#endif
out->data = ImageToBlob(image_info, input_image, &out->size, exception);