FindImageMagick¶
Finds ImageMagick, a software suite for displaying, converting, and manipulating raster images.
New in version 3.9: Support for ImageMagick 7.
Components¶
This module supports components and searches for a set of ImageMagick tools. Typical components include the names of ImageMagick executables, but are not limited to the following (future versions of ImageMagick may provide additional components not listed here):
animatecomparecompositeconjureconvertdisplayidentifyimportmogrifymontagestream
There are also components for the following ImageMagick APIs:
Magick++Finds the ImageMagick C++ API.
MagickWandFinds the ImageMagick MagickWand C API.
MagickCoreFinds the ImageMagick MagickCore low-level C API.
Components can be specified using the find_package() command:
find_package(ImageMagick [COMPONENTS <components>...])
If no components are specified, the module only searches for the ImageMagick executable directory.
Imported Targets¶
This module provides the following Imported Targets:
ImageMagick::Magick++New in version 3.26.
Target encapsulating the ImageMagick C++ API usage requirements, available if ImageMagick C++ is found.
ImageMagick::MagickWandNew in version 3.26.
Target encapsulating the ImageMagick MagickWand C API usage requirements, available if MagickWand is found.
ImageMagick::MagickCoreNew in version 3.26.
Target encapsulating the ImageMagick MagickCore low-level C API usage requirements, available if MagickCore is found.
Result Variables¶
This module defines the following variables:
ImageMagick_FOUNDBoolean indicating whether ImageMagick and all its requested components are found.
ImageMagick_VERSION_STRINGThe version of ImageMagick found.
Note
Version detection is available only for ImageMagick 6 and later.
ImageMagick_INCLUDE_DIRSAll include directories needed to use ImageMagick.
ImageMagick_LIBRARIESLibraries needed to link against to use ImageMagick.
ImageMagick_COMPILE_OPTIONSNew in version 3.26.
Compile options of all libraries.
ImageMagick_<component>_FOUNDBoolean indicating whether the ImageMagick
<component>is found.ImageMagick_<component>_EXECUTABLEThe full path to
<component>executable.ImageMagick_<component>_INCLUDE_DIRSInclude directories containing headers needed to use the ImageMagick
<component>.ImageMagick_<component>_COMPILE_OPTIONSNew in version 3.26.
Compile options of the ImageMagick
<component>.ImageMagick_<component>_LIBRARIESNew in version 3.31.
Libraries needed to link against to use the ImageMagick
<component>.Cache Variables¶
The following cache variables may also be set:
ImageMagick_EXECUTABLE_DIRThe full path to directory containing ImageMagick executables.
Examples¶
Finding ImageMagick with its component
Magick++and linking it to a project target:find_package(ImageMagick COMPONENTS Magick++) target_link_libraries(example PRIVATE ImageMagick::Magick++)